thanks bogu, i resolved it using fopen().
Houdini, i know i can do so but i wanted to do it through pHP script.
But now i'm facing a another problem. when i run this script it show the complete page not the html code. Is there any way by which i can enforce browser to stop executing html code and just to show html source.
My script is written below.
<?php
$fp = fopen("http://localhost/", "r");
if (!$fp) :
echo "Unable to open URL\n";
else:
while (!feof($fp)):
$strp=fgets($fp, 128);
echo $strp;
endwhile;
endif;
fclose($fp);
?>