Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2. $ch = curl_init();
  3.  
  4. curl_setopt($ch, CURLOPT_URL,"http://localhost:1221");
  5. curl_setopt($ch, CURLOPT_POST, 1);
  6. curl_setopt($ch, CURLOPT_POSTFIELDS,
  7.             "postvar1=value1&postvar2=value2&postvar3=value3");
  8.  
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  10.  
  11. $server_output = curl_exec ($ch);
  12.  
  13. curl_close ($ch);
  14. echo $server_output;
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement