Hello there,
WEIRD...fopen couldn't open any http file while it's working fine with any local file.
I've tried the following:
_______________ _______________ _______________ ___________
1.
[code=php]
$fp = fopen("D:\Softw are\\test.txt", "r");
while($data = fgets($fp, 400))
echo $data;
#--> Result OK
[/code]
2.
[code=php]
$fp = fopen("http://www.google.fr", "r");
while($data = fgets($fp, 400))
echo $data;
#--> Result: Warning: fopen() [function.fopen]: php_network_get addresses: gethostbyname failed in C:\wamp\www\hot elGlobe\hotels_ list4.php on line 4
# Warning: fopen(http://www.google.fr) [function.fopen]: failed to open stream: No error in C:\wamp\www\hot elGlobe\hotels_ list4.php on line 4
[/code]
_______________ _______________ _______________ _______________ ___
P.S: I've tried with PHP4 and PHP5 but in vain.Same result with file_get_conten ts().
Please advise.
Thx in advance!
Configuration: Windows XP
Internet Explorer 6.0
WEIRD...fopen couldn't open any http file while it's working fine with any local file.
I've tried the following:
_______________ _______________ _______________ ___________
1.
[code=php]
$fp = fopen("D:\Softw are\\test.txt", "r");
while($data = fgets($fp, 400))
echo $data;
#--> Result OK
[/code]
2.
[code=php]
$fp = fopen("http://www.google.fr", "r");
while($data = fgets($fp, 400))
echo $data;
#--> Result: Warning: fopen() [function.fopen]: php_network_get addresses: gethostbyname failed in C:\wamp\www\hot elGlobe\hotels_ list4.php on line 4
# Warning: fopen(http://www.google.fr) [function.fopen]: failed to open stream: No error in C:\wamp\www\hot elGlobe\hotels_ list4.php on line 4
[/code]
_______________ _______________ _______________ _______________ ___
P.S: I've tried with PHP4 and PHP5 but in vain.Same result with file_get_conten ts().
Please advise.
Thx in advance!
Configuration: Windows XP
Internet Explorer 6.0
Comment