0

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

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Eko
0

First of all , you must get the hole html content of the page in an array.U can do that with the file() function an example :

$arr=file('http://www.yahoo.com');

Grabs all the content found on yahoo.com.
Next you must reach to the area which you want.Use a for loop to get from line to line , an example :

foreach ($arr as $key => $line)

Then you must find an upper bound and lower bound of the part you want. The upper/lower bound can be everything,with the condition that they are unique so you can reference them(ex: an html element with and id attribute , a image that only appears once...)
A way you can do that is with strstr() function.
After,you need to store the info in a variable

if (strstr($line, "upperbound"))
        $content .= $line;

This about it , you now just need to stop the grabing of info in the $content variable with the lowerbound condition and to strip the html tags (strip_tags($content))

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.