Advertisement
artur99

Untitled

Mar 22nd, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. $postdata = http_build_query(['test' => 'data']);
  3. $opts = ['http' =>
  4. [
  5. 'method' => 'POST',
  6. 'header' => 'Content-type: application/x-www-form-urlencoded',
  7. 'content' => $postdata
  8. ]
  9. ];
  10.  
  11. $context = stream_context_create($opts);
  12.  
  13. echo file_get_contents('http://glasulvietii.ro/', false, $context); //merge
  14. echo file_get_contents('http://glasulvietii.ro/test.php', false, $context); //merge
  15. //test.php e un fișier care face var_dump la $_POST
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement