Jump to content

preg_match_all


supermerc

Recommended Posts

Hey, im using curl to get a page and I would like to use preg_match_all to find links that start with something.

 

for example the links look something like this:

 

http://quiver.outwar.com/joinraid.php?raidid=379141&h=abc0bbf0b2e4acfec4b6dc7a3a05557b

 

but the raidid changes every time so i need to grab all the links that start with

http://quiver.outwar.com/joinraid.php?raidid= so I can get the raid id from each.

 

can anyone help me with the regex?

Link to comment
https://forums.phpfreaks.com/topic/163168-preg_match_all/
Share on other sites

so in my example, I used $content to represent the page you are cURLing.  Are you using the right variable there? If so, did you echo it out to make sure you're actually getting the content? If so, post an example of the  link (and some of the content surrounding it) from what you what you retrieved from your cURL.

Link to comment
https://forums.phpfreaks.com/topic/163168-preg_match_all/#findComment-860898
Share on other sites

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.