Guest User

Untitled

a guest
May 22nd, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. $ch = curl_init();
  2. $url = "/var/www/cgi-bin/login.pl?username=".$_POST['log']."&pass=".$_POST['pwd'];
  3. $timeout = 0; // set to zero for no timeout
  4. curl_setopt ($ch, CURLOPT_URL, $url);
  5. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  6. curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  7. $file_contents = curl_exec($ch);
  8. curl_close($ch);
  9. echo $file_contents;
  10.  
  11. //how about this
  12. //$url = "/var/www/cgi-bin/login.pl?".$_POST['log']."%20".$_POST['pwd'];
Add Comment
Please, Sign In to add comment