Topic awaiting preservation: Hidden url finder on remote server with cURL slow timout (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Belgium |
posted 04-13-2006 16:02
Hi all, code: <html> <?php function url_exists($strURL) { $resURL = curl_init(); curl_setopt($resURL, CURLOPT_URL, $strURL); curl_setopt($resURL, CURLOPT_BINARYTRANSFER, 1); curl_setopt($resURL, CURLOPT_HEADERFUNCTION, 'curlHeaderCallback'); curl_setopt($resURL, CURLOPT_FAILONERROR, 1); curl_exec ($resURL); $intReturnCode = curl_getinfo($resURL, CURLINFO_HTTP_CODE); curl_close ($resURL); if ($intReturnCode != 200 && $intReturnCode != 302 && $intReturnCode != 304) { return false; }Else{ return true ; } } for($i = 0; $i < 1000000; $i++) { $j=str_pad($i, 6, "0", STR_PAD_LEFT); $url="http://www.dummy.com/".$j.".htm"; If(url_exists($url)) { Echo"$url"; exit; }Else{ Echo""; } } ?> </html>
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 04-13-2006 17:17
This might work, but hitting 10^6 pages ain't gonna be ever fast. |