jd2007 Posted July 28, 2007 Share Posted July 28, 2007 how is that web fetching done, what functions to use, can i access their database ? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 28, 2007 Share Posted July 28, 2007 1st ask if you are allowed, but if you are there are different ways (usually not through their db) odds are you will have to manually create a php script that nabs each "band" off a search in their site via fopen or cURL and then copy the data into your database. Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 28, 2007 Author Share Posted July 28, 2007 thanks..pls show me a good example of fopen Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 28, 2007 Share Posted July 28, 2007 basically the idea is you copy and paste off a page, but using string mainipulations fopen() can open any url like fopen(http://www.google.com/?serach=php); if you know xml the idea would be to find those xml tags like if its <band>Creed</band> you find the tag <band> and then the tag </band> and say give me the text between it and call that $band make sense? Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 28, 2007 Author Share Posted July 28, 2007 yeah i get it...thanks...so if i type this : <song>Rocket Man</song> i can find the words rocket man on the site... Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 28, 2007 Author Share Posted July 28, 2007 i want to take this: Label: Supreme Records Catalog#: S 512 Format: Vinyl, 7" Country: Belgium Released: 1972 Genre: Rock Style: Pop Rock Credits: Producer - Gus Dudgeon Notes: Rating: No votes yet. Rate It Submitted by: Evilist from the site : http://www.discogs.com/release/479714 pls show me how to code it Quote Link to comment Share on other sites More sharing options...
ss32 Posted July 28, 2007 Share Posted July 28, 2007 find the first index of "Label", and then the index of the newline character after "submitted by". those are some fairly simple loops... they shouldnt be hard. substring the page with those obtained indices explode the new string by the newline / "<br />" character foreach of the exploded strings, split it among the ":" character, and then store those into an associative array. thats the basic idea. Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 28, 2007 Author Share Posted July 28, 2007 just show me an code example of the above. Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 28, 2007 Author Share Posted July 28, 2007 never mind, i can do it myself. Quote Link to comment 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.