How can I get the "$buffer" value into a string, and use it outside the fopen and fclose functions? Thanks.
$handle = @fopen("http://www.example.com/", "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgetss($handle, 5000);
echo $buffer ;
}
fclose($handle);
}
$handle = @fopen("http://www.example.com/", "r");
$buffer = '';
if ($handle) {
while (!feof($handle)) {
$buffer .= fgetss($handle, 5000);
}
fclose($handle);
}