Re[2]: [PHP] Accessing a website from within a php script

From: Date: Tue, 13 Jan 2004 10:41:35 +0000
Subject: Re[2]: [PHP] Accessing a website from within a php script
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-174421@lists.php.net to get a copy of this message
Hello Børge, Tuesday, January 13, 2004, 10:32:08 AM, you wrote: BS> Do you see something that it obviously wrong here? You need to loop through the data as it comes back from the fopen function. <?php print '<html><body>' . "\n"; print 'test6.php<br>'; $fp = fopen("http://www.boggle.no/message.txt", "rb"); $contents = ""; do { $data = fread($handle, 8192); if (strlen($data) == 0) { break; } $contents .= $data; } while (true); fclose($handle); print $contents; print '</body></html>' . "\n"; ?> -- Best regards, Richard mailto:rich@launchcode.co.uk

« previous php.general (#174421) next »