Hello,
I've been at this PHP thing for about 13 hours now, and I love it!
Got a newbie problem that may be PHP, may be my host:
Trying to grab a page of HTML and add line numbers to it (right out of the php.net documentation for file() ):
<?php
// get a web page into an array and print it out
$fcontents = file( 'http://www.php.net' );
while ( list( $line_num, $line ) = each( $fcontents ) ) {
echo "<b>Line $line_num:</b> " . htmlspecialchars( $line ) . "<br>\n";
}
?>
This script doesn't work for any file that is not on my server, but works fine for files within my domain.
http://www.sizzlinsummer.com/index3.php3 - works fine - target=index.htm
http://www.sizzlinsummer.com/index4.php3 - doesn't work - target=http://www.php.net
Am I doing something wrong, or is my hosting provider not allowing this to happen?
Thanks in advance,
Alan