...

View Full Version : fopen problem with remote url



usban
12-22-2003, 11:33 PM
I'm having problems with the fopen function while trying to open a remote url. The problem is that the function only gets part of the web.
It is a big page, but i can only get until the javascript.

The code i use is:

$url = fopen("http://www.url.com","r");
$content = fread($file,100000000);
fclose($url);


I use Windows Xp and Apache.

Thank you.

Celtboy
12-22-2003, 11:48 PM
try:


<?php
$content = "";
$url = fopen("http://www.url.com","r");
while (!feof($url)) {
$content .= fgets($url,1024);
}
fclose($url);
?>

usban
12-22-2003, 11:53 PM
Thank you very much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum