your sample seems to be incomplete
you define $arr
where does $arrTmp comes from?
what is $i? is it defined?
whats between the var_dump and echo?
and whats the purpose of this Action?
EDIT:
just tested:
$url = 'http://w3schools.com/tags/ref_standardattributes.asp';
$ctx = stream_context_create(array('http'=> array( 'timeout' => 60 ) ));
$content = file_get_contents($url, false, $ctx);
$arrTmp = explode('>',$content);
for($i = 0; $i < count($arrTmp); $i++)
{
echo '<br />';
echo 'Res->'.htmlspecialchars(trim($arrTmp[$i]));
}
result:
Res-><!DOCTYPE html
Res-><html lang="en-US"
Res-><head
Res-><title
and so on ...
maybe a server-setup-issue? but i have no idea what it could be at your side ...
'; echo 'Res->'.($arrTmp[$i]); } Thanks! – Tran Hieu Nov 09 '14 at 15:35