12-14-2011, 11:13 PM
If you want to show a website under your Domain Name use the code below:
You could always try copying the source by hand or using a program like HTTrack:
You could try str_replace() or preg_match_all(), it somewhat like a proxy,
check this out http://snoopy.sourceforge.net . yet its very hard to meet all HTML tags by use a solid script or method if your site has a complex structure.
Or Use the code below:
Though images, css and js won't work.
I'll share more helpful information/guide soon.
Press THANKS or REP me if you found it useful.
PHP Code:
<?php
$url = "sample.com";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
echo $curl_scraped_page;
?>
You could always try copying the source by hand or using a program like HTTrack:
Code:
http://www.httrack.com/
You could try str_replace() or preg_match_all(), it somewhat like a proxy,
check this out http://snoopy.sourceforge.net . yet its very hard to meet all HTML tags by use a solid script or method if your site has a complex structure.
Or Use the code below:
PHP Code:
<?php
function get_contents($url){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 1000);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
}
$data=get_contents("http://www.google.com");
$data = str_replace("google","yahoo",$data);
echo $data;
?>
I'll share more helpful information/guide soon.
Press THANKS or REP me if you found it useful.