Hi, I saw a script before that make a clone of a website with .htaccess and 1 or 2 php files ... i know it was with curl or sth like this , in setting file u put the url of the site u want. for example en.wikipedia.org then in ur site , u will have all of wikipedia sites , without saving anything with ur link , like parking ur domain on there wikipedia.org/yourrapid ---> yourdomain.com/yourrapid exactly the same (also pictures were on the yourdomain.com ... i know they done it with .htaccess) i tried to code it , but i wasn't able to ... will you help me ? thanks
<?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://alexa.com'); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); if (empty($buffer)) { print "Timed Out"; } else { print $buffer; } ?> Code (markup): Works with some sites, hardly any major ones.. Doesn't pull stylesheets, but it's somewhere to start I guess.
Thanks , but in this curl example , we don't get the image urls , ... in our site place and as u said there is problem with style ... and , how to get urls of that website in our site , i mean replace the urls from alexa.org/siteowners to yourdomain.com/siteowners for example **** edit : i've find sth else works better , but the urls are still not replaced and are the main site urls..how to replace them with same name , i know we have to use .htaccess and mod rewrite :-s <?php function get_content($url) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec ($ch); curl_close ($ch); $string = ob_get_contents(); ob_end_clean(); return $string; } $content = get_content("http://www.forums.digitalpoint.com"); echo $content ; ?> Code (markup):
I still haven't any way to replace the urls of the site i'll make clone with my urls... any one will help ? :-s