mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1452 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8970157801
commit
422c6e9fd6
7 changed files with 47 additions and 17 deletions
|
|
@ -133,23 +133,23 @@
|
|||
|
||||
if(!$url_info['port']) $url_info['port'] = 80;
|
||||
|
||||
$fp = fsockopen($url_info['host'], $url_info['port']);
|
||||
$fp = @fsockopen($url_info['host'], $url_info['port']);
|
||||
if(!$fp) return;
|
||||
|
||||
$header = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nReferer: %s://%s\r\n\r\n", $url_info['path'], $url_info['host'], $url_info['scheme'], $url_info['host']);
|
||||
fwrite($fp, $header);
|
||||
@fwrite($fp, $header);
|
||||
|
||||
$ft = fopen($target_filename, 'w');
|
||||
$ft = @fopen($target_filename, 'w');
|
||||
if(!$ft) return;
|
||||
|
||||
$begin = false;
|
||||
while(!feof($fp)) {
|
||||
$str = fgets($fp, 1024);
|
||||
if($begin) fwrite($ft, $str);
|
||||
if($begin) @fwrite($ft, $str);
|
||||
if(!trim($str)) $begin = true;
|
||||
}
|
||||
fclose($ft);
|
||||
fclose($fp);
|
||||
@fclose($ft);
|
||||
@fclose($fp);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue