n8w Posted December 9, 2006 Share Posted December 9, 2006 I think what I want to do is web scrape .. but how would I write a script to do the following.I want to run a script every 30 minutes (using .htaccess I guess) that will view http://www.illustrationmundo.com and save the source exactly how a browser would see it as a file .. cached.phpHow do I go about this?Thanks Link to comment https://forums.phpfreaks.com/topic/30024-web-scraping-question/ Share on other sites More sharing options...
esukf Posted December 9, 2006 Share Posted December 9, 2006 You should be able to do this by setting up a cronjob and use wget rather than a php script.Try :-wget http://www.illustrationmundo.com -O cache.php Link to comment https://forums.phpfreaks.com/topic/30024-web-scraping-question/#findComment-138025 Share on other sites More sharing options...
n8w Posted December 9, 2006 Author Share Posted December 9, 2006 wow .. very cool! .. so if I want to run this every 5 minutes would it be5 * * * * wget http://www.illustrationmundo.com -O cache.php Link to comment https://forums.phpfreaks.com/topic/30024-web-scraping-question/#findComment-138039 Share on other sites More sharing options...
esukf Posted December 9, 2006 Share Posted December 9, 2006 I'm not too familiar with the command but think 5 * * * * runs every 5th minute of the hour ie. 0:05, 1:05Try*/5 * * * * wget http://www.illustrationmundo.com -O cache.phpAlso probably best to use the fullpath where you save the file. Not sure where cron saves to by default. Link to comment https://forums.phpfreaks.com/topic/30024-web-scraping-question/#findComment-138046 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.