Jump to content

Grabbing multiple URLs in a page into array


dagnasty

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!
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.