title: php curl sending data from one iframe to another
body: <p>I need to use cURL to send data from one iframe to another. My code is:
  </p>
  
  <pre><code>    &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
          &lt;title&gt;New Web Project&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form action="postback.php" method="POST"&gt;
              &lt;input type="hidden" name="variable" value="send"/&gt;
              &lt;input type="submit" /&gt;
          &lt;/form&gt;
          &lt;iframe name="test" src="postback.php" width="200" height="200"&gt;&lt;/iframe&gt;postback
          &lt;iframe name="test2" src="replay.php" width="200" height="200"&gt;&lt;/iframe&gt;replay
      &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>and two iframes code:
  postback iframe:</p>
  
  <pre><code>&lt;?php
  if (isset($_POST["variable"])){
      $var1 = $_POST["variable"];
  
          $url = 'http://localhost/xss/replay.php';
          $ch = curl_init($url);
          $parameters = 'variable2='.$var1;
          //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_POST, 1);
          curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);
          curl_exec($ch);
          curl_close($ch);
  
  }
  else echo 'w8';
  ?&gt;
  </code></pre>
  
  <p>replay iframe:</p>
  
  <pre><code>&lt;?php
  if (isset($_POST["variable2"])){
      $var1 = $_POST["variable2"];
  
      echo $var1;
  }
  else echo 'w8';
  ?&gt;
  </code></pre>
  
  <p>and in this case I get response from secound iframe (replay.php) to new page instead of print variable 2 to secound iframe. How can I change it? I would add that I cant use JavaScript/AJAX/jQuery ect. only server side scripting</p>