Skip to content

Instantly share code, notes, and snippets.

Created January 31, 2012 23:04
Show Gist options
  • Select an option

  • Save anonymous/1713647 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/1713647 to your computer and use it in GitHub Desktop.
<?php
$url = 'http://vbox7.com/play:e3ce46716f';
$ch = curl_init();
$timeout = 35;
$cookie_file = "./cookie.txt";
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
curl_setopt($ch, CURLOPT_USERAGENT, 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)');
$data = curl_exec($ch);
echo curl_error($ch);
curl_close($ch);
echo $data;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment