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 ? Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/ 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. Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309398 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 Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309412 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? Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309415 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... Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309419 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 Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309427 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. Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309439 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. Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309453 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. Link to comment https://forums.phpfreaks.com/topic/62149-i-want-to-take-information-about-songs-and-albums-from-other-web-siteshow/#findComment-309479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.