I have a little problem with downloading PS file from citeseer. After download I need to parse that file so I use this method for it:
<pre>
function SaveFile() {
if (!isset($this->download)) {
return false;
}
$fr = fopen($this->download, "r");
if (!$fr) {
$this->chyba->Set(ERR_OTEVRIT_PRO_CTENI, $this->download);
return false;
}
$fw = @fopen($this->file, "w");
if (!$fw) {
$this->chyba->Set(ERR_OTEVRIT_PRO_ZAPIS, $this->file);
return false;
}
$size = 0;
while (!feof($fr)) {
$data = fread($fr, MAX_BLOCK_SIZE);
$size += fwrite($fw, $data);
}
fclose($fr);
fflush($fw);
fclose($fw);
return $size;
}
</pre>
It worked well last month but now not. It still writes me this message:
<pre>
Warning:
fopen("http://citeseer.nj.nec.com/rd/0%2C389383%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/compress/0/papers/cs/18860/http%253AzSzzSzsra.itc.itzSzpeoplezSzroverizSzpaperszSzCAV99.ps.gz/cimatti99nusmv.ps", "r") - Success in /public_html/lib/clanek.php on line 298
</pre>
And if I try to use <b>fsockopen</b> function, it still writes:
<pre>
HTTP/1.1 503 System busy
Date: Mon, 06 May 2002 11:42:41 GMT
Server: Apache/1.3.20 (Unix)
Accept-Ranges: none
Connection: close
Content-Type: text/html; charset=ISO-8859-1
</pre>
Can anyone help me?