jamesxg1 Posted July 20, 2009 Share Posted July 20, 2009 Hiya foke's, Im in dire need of either advice or recommendation, Here goes: Basically if you go to the link i have put below this it goes to google map's with a query already entered if you look to the side you see all the text/link results and information of the establishment under it, i need get get hold of either software or php script that will rip that data into a .txt file in the way i need eg. no just the whole thing in one hit i need it nicely layed out is there anything i can do ?, http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=indian+delivery+in+Berkshire&sll=52.173511,-0.411301&sspn=0.205075,0.441513&ie=UTF8&ll=52.089633,-0.411301&spn=0.194915,0.441513&z=11 Many many thanks, James. Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/ Share on other sites More sharing options...
jamesxg1 Posted July 20, 2009 Author Share Posted July 20, 2009 Anyone ? Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/#findComment-878819 Share on other sites More sharing options...
jamesxg1 Posted July 20, 2009 Author Share Posted July 20, 2009 im in really big need of this guy's anyone ? Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/#findComment-878835 Share on other sites More sharing options...
gijew Posted July 20, 2009 Share Posted July 20, 2009 I guess you do need this posting every 20 minutes I've written a spider before and the best way to do that is use CURL to crawl the link, put the HTML in a text file and use a regular expression to get the data you want from it. Just do a search for "CURL spiders" or "crawl a website with CURL" and it'll come up with a few hits. Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/#findComment-878841 Share on other sites More sharing options...
jamesxg1 Posted July 20, 2009 Author Share Posted July 20, 2009 I guess you do need this posting every 20 minutes I've written a spider before and the best way to do that is use CURL to crawl the link, put the HTML in a text file and use a regular expression to get the data you want from it. Just do a search for "CURL spiders" or "crawl a website with CURL" and it'll come up with a few hits. Lmfao!, DESPERATELY !! lol, and ok mate 2 secz i will have a little look , thanks for the advice much appreciated James. Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/#findComment-878844 Share on other sites More sharing options...
.josh Posted July 20, 2009 Share Posted July 20, 2009 If you're need is really that great, I suggest you hire someone to do it. There is no generic script when it comes to scraping pages, as each page is unique. Learn the art of regex or open up your wallet to someone who has. If you want to learn it yourself, as mentioned by previous poster, look into cURL for getting the initial page content. You can then possibly use DOM to get what you're looking for. If not, you're going to have to get your hands dirty with regex, using preg_match or preg_match_all. I'm moving this thread to the regex forum. In that forum you can see stickies detailing resources for learning regex. As far as storing it in a text file, you'd use something like fwrite (with its supporting functions, like fopen and fclose) or file_put_contents. As far as making it "nicely laid out" well that's up to you to decide how it should be displayed. In general, you would write a script to read the contents of the text file, using fread or file, loop through it, marking it up with html or css. Quote Link to comment https://forums.phpfreaks.com/topic/166663-solved-in-dire-need-of-this-webspider-help-i-think/#findComment-878850 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.