note 92977 deleted from function.get-headers by danbrown

From: Date: Mon, 17 Aug 2009 22:58:35 +0000
Subject: note 92977 deleted from function.get-headers by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159582@lists.php.net to get a copy of this message
Note Submitter: lorenzo77 ---- response for : gabe at vtunnel dot com for following redirections and get all headers, it's more faster to do this : <?php function get_all_headers_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $r = curl_exec($ch); $r = split("\n", $r); return $r; } ?>

« previous php.notes (#159582) next »