|
|
file_get_contents() - PHP
|
Views : 222
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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;
}
?> |
|
By banumathi, On - 2011-10-01 |
|
|
|