Advertisement
Guest User

Untitled

a guest
May 5th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. $string = file_get_contents('a.txt');
  2.  
  3. $regex = '/b(http|rtmp|rtsp|mmsh|mms)://[-A-Z0-9+&@#/%?=~_|$!:,.;]*[A-Z0-9+&@#/%=~_|$]/i';
  4. preg_match_all($regex, $string, $matches);
  5. $urls = $matches[0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement