Public paste
test..
By: PnE | Date: Oct 8 2008 19:48 | Format: PHP | Expires: never | Size: 594 B | Hits: 1373

  1. <?php
  2. $a=$_POST["a"];
  3. $ch = curl_init() or die(curl_error());
  4. $params="a=$a";
  5. curl_setopt($ch, CURLOPT_POST,1);
  6. curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
  7. curl_setopt($ch, CURLOPT_URL,"http://lan:85/cgi-bin/video.jpg?size=3");
  8. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  9. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  10. curl_setopt($ch, CURLOPT_USERPWD, 'demo:'); // IF required
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
  12. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
  13. $data1=curl_exec($ch) or die(curl_error());
  14. echo "".$data1."";
  15. echo curl_error($ch);
  16. ?>