
May 30th, 2003, 08:26 PM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 19
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
fopen problem
hello guys i have some problem with function fopen
i got this messages in my errors log file:
Code:
[Sat May 31 04:02:31 2003] [error] PHP Warning: fopen(http://us.imdb.com/Title?0279111) [<a href='http://www.php.net/function.fopen'>function.fopen</a>]: failed to create stream: HTTP request failed! HTTP/1.1 403 Forbidden
in /var/www/costumers/toxxclub/add.php on line 21
[Sat May 31 04:02:31 2003] [error] PHP Warning: fgets(): supplied argument is not a valid stream resource in /var/www/costumers/toxxclub/add.php on line 22
[Sat May 31 04:02:31 2003] [error] PHP Warning: fclose(): supplied argument is not a valid stream resource in /var/www/costumers/toxxclub/add.php on line 25
this is my php version:
PHP 4.3.1 (cgi-fcgi), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
this is part from code:
PHP Code:
if (! is_null($_POST['imdb_url'])) {
$imdb_url = $_POST['imdb_url'];
$fd=fopen("$imdb_url","r");
while ($line=fgets($fd,4096)) {
$imdb_page.=$line;
};
fclose ($fd);
if (ereg('name="poster"[^>]*>(<[^<]*)', $imdb_page, $temp)) {
if (ereg('src="([^"]*)', $temp[1], $temp)) {
$cover_art = $temp[1];
};
};
before two days everything was fine but when i update php this wont work previews php was 4.2.2 any ideas ?
thanks in advanced
|