Ejemplo n.º 1
0
*/
use Fire1\AmfLeech\Curl\SendRequest;
use Fire1\AmfLeech\Utils;
include "bootstrap.php";
error_reporting(E_ALL);
//
// Load dumped files
$rd = new Utils\DumpReader(__DIR__ . '/AmfDumps/mandator/');
$op = (new Utils\DumpPacket($rd))->expandAll();
//
// Gets container array with amf dumps
$arrAmf = $op->getArrContainer();
//
// Configure Client request sender
SendRequest::$referer = "your-server.test/client";
SendRequest::$endpoint = "[your-server.test/message/broker/amf]";
echo "<div style='width: 1020px;margin: auto;'> <pre>";
//
// Loop array container and trigger requests to the server
foreach ($arrAmf as $index => $amf) {
    /* @var \Fire1\AmfLeech\Utils\AmfContainer $amf */
    if ($amf instanceof \Fire1\AmfLeech\Core\Interfaces\AmfStreamInterface) {
        echo "<div style='clear: both;display: block'>";
        //
        // Read request from server
        echo "<div style='padding:15px;width: 465px;display: inline-block;float: left;background: #c2face'> <h2> Request <b> {$index} </b> </h2>\n \n";
        var_dump($amf->read());
        echo '</div>';
        // Send request to  server
        $cli = (new SendRequest($amf->getEncoded()))->getReply();
        //
Ejemplo n.º 2
0
 /**
  * @param      $dsi
  * @param bool $force
  */
 public function setHeadersId($dsi, $force = false)
 {
     if ($force || empty(SendRequest::$chanel)) {
         SendRequest::$chanel = $this->DSId = $dsi;
     }
 }
Ejemplo n.º 3
0
 /**
  *  Regenerate inner message ID
  * @return Read
  */
 public function generateIds()
 {
     !empty(SendRequest::$chanel) ?: (self::$clientChanelId = SendRequest::$chanel = $this->getRandomId());
     $this->setHeaders();
     $this->getData()->messageId = $this->getRandomId();
     return $this;
 }