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. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/ Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Ugh, please people, help me. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205836 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Bump. Help please. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205852 Share on other sites More sharing options...
idevlabsdotcom Posted March 13, 2007 Share Posted March 13, 2007 . Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205854 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); Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205857 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. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205872 Share on other sites More sharing options...
fert Posted March 13, 2007 Share Posted March 13, 2007 $result=curl_exec($curl); Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-205891 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 13, 2007 Author Share Posted March 13, 2007 Thank you. I appreciate it. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-206521 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. Link to comment https://forums.phpfreaks.com/topic/42430-parsing-a-link/#findComment-206815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.