HaLo2FrEeEk Posted March 12, 2007 Share Posted March 12, 2007 Hi, I want to use CURL to retrieve the code for a webpage then find a link inside the page, the link is in the format of: http://files.redvsblue.com/RvB05/5x(*)/fl4sh/(*).flv Where (*) indicates a wildcard, I want to be able to parse out this link to a variable, then print it on the page in a link for download, does anyone know how I can do this? Here is one of the pages I will be parsing: http://rvb.roosterteeth.com/archive/episode.php?id=244 The videos there are in flash video format and I like to download them in that format instead of the wmv format becuase the flash files are higher resolution, I know this is possible, so can someone show me how to please? I had a file that would use CURL to get a file or page from a remote url, but I deleted it and I don't remember how to do it, so I'll need help with that too. Thank in advance. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Ugh, please people, help me. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Bump. Help please. Quote Link to comment Share on other sites More sharing options...
idevlabsdotcom Posted March 13, 2007 Share Posted March 13, 2007 . Quote Link to comment Share on other sites More sharing options...
fert Posted March 13, 2007 Share Posted March 13, 2007 preg_match("http:\/\/files\.redvsblue\.com\/RvB05\/5x(.*)\/fl4sh\/(.*)\.flv",$text,$matches); print_r($matches); Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 How do I get the text though? I can use CURL to get the page, but I can't remember how to save the page source to a variable. Thank you, btw. Quote Link to comment Share on other sites More sharing options...
fert Posted March 13, 2007 Share Posted March 13, 2007 $result=curl_exec($curl); Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Thank you. I appreciate it. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 14, 2007 Author Share Posted March 14, 2007 I get this error when parsing the page: Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/.hortense/halo2freeek/claninfectionist.com/misc/testing/curl.php on line 5 So I guess your code didn't work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.