doforumda Posted May 30, 2009 Share Posted May 30, 2009 hi i want to make a clone that will read all the text and images from other news websites. so i want to know how can it be possible? i mean to ask how can i clone other website by using PHP? Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/ Share on other sites More sharing options...
Garethp Posted May 30, 2009 Share Posted May 30, 2009 Google CURL. If you don't care about security, you could always just include() their site, or you can use HTML to iframe it Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845668 Share on other sites More sharing options...
homer.favenir Posted May 30, 2009 Share Posted May 30, 2009 you want to get the contents of a website? try this: <?php $homepage = file_get_contents('http://www.example.com/'); echo $homepage; ?> Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845669 Share on other sites More sharing options...
Garethp Posted May 30, 2009 Share Posted May 30, 2009 But if he does that, what if they're linking files without referencing the whole URL? like <img src="images/something.jpg">? And JS files that are sourced like that? Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845670 Share on other sites More sharing options...
homer.favenir Posted May 30, 2009 Share Posted May 30, 2009 he will have to copy the image and paste it in his root folder Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845672 Share on other sites More sharing options...
doforumda Posted May 30, 2009 Author Share Posted May 30, 2009 thank you Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845674 Share on other sites More sharing options...
Garethp Posted May 30, 2009 Share Posted May 30, 2009 Why not use RegEx to check if any sourced files have http:// in the beginning, and if not, add them? Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845675 Share on other sites More sharing options...
doforumda Posted May 30, 2009 Author Share Posted May 30, 2009 what is RegEx? Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845677 Share on other sites More sharing options...
Garethp Posted May 30, 2009 Share Posted May 30, 2009 It's like a way of checking if your string matches a certain pattern or not... it's really useful, see if you can google some PHP Regex tutorials Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845681 Share on other sites More sharing options...
Daniel0 Posted May 30, 2009 Share Posted May 30, 2009 You agree that you will uphold international law' date=' United States Federal law, Florida state law and any law that is applicable in your area of residence.[/quote'] Other websites' content and artwork are protected by international copyright law. Link to comment https://forums.phpfreaks.com/topic/160256-cloning-in-php/#findComment-845685 Share on other sites More sharing options...
Recommended Posts