So i want to get content from some link with php i try this: <?php // For PHP 5 and up $handle = fopen("http://www.example.com/", "rb"); $contents = stream_get_contents($handle); fclose($handle); ?> PHP: and this: <?php $handle = fopen("http://www.example.com/", "rb"); $contents = ''; while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); ?> PHP: but they doesn't works please help me
i have this code: <?php // For PHP 5 and up $handle = fopen("http://www.google.com/", "rb"); $contents = stream_get_contents($handle); fclose($handle); ?> here: http://nonagame.com/oo.php , you can see there is this error: Fatal error: Call to undefined function: stream_get_contents() in /home/www/nonagame.com/oo.php on line 4
Fatal error: Call to undefined function: stream_get_contents() in /home/www/nonagame.com/oo.php on line 4 The line above means you dont have the function in your setup, i think that function is only available on PHP5 are you sure you are using php5?
i wrote this code <?php $handle = file_put_contents("http://www.google.com/"); echo $handle; ?> but there is error Fatal error: Call to undefined function: file_put_contents() in /home/www/nonagame.com/oo.php on line 2