jwk811 Posted April 6, 2010 Share Posted April 6, 2010 $url = $_POST['txtUrl']; preg_match('#v=[^&]*#', $url, $match); $result=implode(' ',$match); $code = substr($result, 2); this is supposed to get me: http://www.youtube.com/watch?v="thispart" of the url i dunno why its not working now.. Link to comment https://forums.phpfreaks.com/topic/197779-get-certain-part-of-a-url/ Share on other sites More sharing options...
JAY6390 Posted April 6, 2010 Share Posted April 6, 2010 is txtUrl encoded? might need to use urldecode() Link to comment https://forums.phpfreaks.com/topic/197779-get-certain-part-of-a-url/#findComment-1037899 Share on other sites More sharing options...
jwk811 Posted April 6, 2010 Author Share Posted April 6, 2010 no its a url they put in a textbox and send in the form Link to comment https://forums.phpfreaks.com/topic/197779-get-certain-part-of-a-url/#findComment-1037913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.