Parse youtube links PHP

Posted by Isis on Stack Overflow See other posts from Stack Overflow or by Isis
Published on 2010-04-19T10:21:43Z Indexed on 2010/04/19 10:23 UTC
Read the original article Hit count: 208

Filed under:
|
|

Hello

34|http://v19.lscache8.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc:U0dWRlZUVF9FSkNNNl9OTlhF&fexp=902210&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1271696400&key=yt1&signature=583C4A85FA65B6B9782B8B4B5E1F1C08D9EADCA3.5B28033470580BC52EB92A1CB71DBAFE0C4A2A8D&factor=1.25&id=cf3cec58d98073dc,5|http://v24.lscache4.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc:U0dWRlZUVF9FSkNNNl9OTlhF&fexp=902210&algorithm=throttle-factor&itag=5&ipbits=0&burst=40&sver=3&expire=1271696400&key=yt1&signature=7B74075BAA26B05A028B2219FD52D7A45197F555.A8878413DC7BB3FFAB0C9219CBD3FCDD7221B440&factor=1.25&id=cf3cec58d98073dc

How to parse this text for:

34
http://... (before ,5|)
5
http://... to end

Previously it was done so:

if (preg_match_all('#|(.*?),#', $urlmap, $b)) {
}

Sorry for baaaaad english

© Stack Overflow or respective owner

Related posts about youtube

Related posts about links