Jump to content

Archived

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

dagnasty

Grabbing multiple URLs in a page into array

Recommended Posts

I've looked everywhere for help and searched this forum as well, but I can't seem to find the function that does what I need.

So I'm trying to figure out how to grab each torrent url from this page

[url=http://torrentspy.com/rss.asp?mode=search&query=movie&db=3]http://torrentspy.com/rss.asp?mode=search&query=movie&db=3[/url]

into an array.

My guess is to use something similar to preg_match but that only grabs the first finding it spots.

So how would I go about grabbing each seperate url?

Someone, PLEASE :) I'm going nuts!

Share this post


Link to post
Share on other sites
check this thread out. someone asked for something similar. you should be able to simply tweak the preg_match expression to fit your needs. if you need help with the regex expression, head over to the regex forum it's there specifically for regex questions cuz it's a pretty popular topic.

http://www.phpfreaks.com/forums/index.php/topic,99198.msg390571.html#msg390571

edit:
oh yeah, you probably don't need the inner foreach loop that loops through the movie type array, so get rid of that.

Share this post


Link to post
Share on other sites

×

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.