Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1197 if ($fp = @fsockopen($host, $port,$errno,$errst,2))
- 1198 {
- 1199 // connected!
- 1200 $success = true;
- 1201
- 1202 //stream_set_timeout($fp,10);
- 1203 $out = "GET /{$matches[2]} HTTP/1.0\r\n";
- 1204 $out .= "Host: {$host}\r\n";
- 1205 $out .= "Connection: Close\r\n\r\n";
- 1206
- 1207 fwrite($fp, $out);
- 1208 if (!isset($xml)) { $xml=''; }
- 1209 while (!feof($fp))
- 1210 {
- 1211 $endtime = microtime(); $etime = explode(' ', $endtime); $end = $etime[0] + $etime[1];
- 1212 $xmltime = number_format($end - $start, 4);
- 1213
- 1214
- 1215 if ($xmltime > 4)
- 1216 {
- 1217 if ($_REQUEST['debug']) echo "<div>WARNING: Taking too long to read file ({$xmltime})</div>";
- 1218 $success = false;
- 1219 break;
- 1220 }
- 1221
- 1222 $line = fgets($fp, 4096);
- 1223 $xml .= $line;
- 1224 }
- 1225
- 1226 fclose($fp);
- 1227 }
Add Comment
Please, Sign In to add comment