← Back
Editing: curl.php
<?php $url = "https://www.maremmacongress.com"; $gacookie = "/tmp/cookie.txt"; if (file_exists($gacookie)) unlink($gacookie); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt ($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_ENCODING, true); //curl_setopt($ch, CURLOPT_COOKIEJAR, "/home/www/cookies.txt"); //curl_setopt($ch, CURLOPT_COOKIEFILE, "/home/www/cookies.txt"); curl_setopt ($ch, CURLOPT_COOKIEJAR, $gacookie); curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE); $result = curl_exec($ch); $info = curl_getinfo($ch); print_r($info); curl_close($ch); ?>
Save File
Cancel