Jump to content

I want to take information about songs and albums from other web sites...how ?


jd2007

Recommended Posts

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.

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?

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.