Public paste
Solved webcam shit!!!
By: PnE | Date: Oct 8 2008 20:56 | Format: PHP | Expires: never | Size: 517 B | Hits: 770

  1. <?php
  2. $ch = curl_init() or die(curl_error());
  3. curl_setopt($ch, CURLOPT_URL,"http://lan:85/cgi-bin/video.jpg?size=3");
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  6. curl_setopt($ch, CURLOPT_USERPWD, 'user:pass'); // IF required
  7. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
  8. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
  9. $data1=curl_exec($ch) or die(curl_error());
  10. header("Content-type: image/jpeg");
  11. print_r($data1);
  12. echo curl_error($ch);
  13. ?>