file_get_contents()

by banumathi 2011-10-01 18:22:04

Some times file_get_contents($url) will not display images in the $url.
This code rectifies that issue.

<?php
$URL = "http://www.indiandir.com/addurl.php";
$domain = file_get_contents($URL);
if($domain !== FALSE)
{
$domain = preg_replace('/<head>/i', "<head>\n<base href='$URL'>\n", $domain);
echo $domain;
}

?>

Tagged in:

896
like
0
dislike
0
mail
flag

You must LOGIN to add comments