Southwind* Posted December 28, 2010 Report Share Posted December 28, 2010 Gribēju paintresēties. Ko man meklēt lai izveidotu kautko šādu - ? Man vajag forumā ievietot video bez tagiem. Lai viņš automatiski atpazīst linku no youtubes un izveido video kodu. kā iekš draugiem.lv Nezinu, kur lai meklēt tadēļ griežos pie jums ! :) Quote Link to comment Share on other sites More sharing options...
ezis Posted December 28, 2010 Report Share Posted December 28, 2010 Vienkāršais variants laikam būtu ar preg_match. Nočeko vai tekstā ir jūtūba links, ja ir, tad griez ārā un tā vietā liec playeri :P Vai Tev vajag ar AJAX? o0 (vismaz titlē rakstīts ajax ^^) Quote Link to comment Share on other sites More sharing options...
shurix Posted December 28, 2010 Report Share Posted December 28, 2010 Vis vis vienkāršākais ir ar substr noskaitīt cik burti ir no sākuma līdz video id un paņemt 11 sibmolus (video id) http://lv.php.net/substr Quote Link to comment Share on other sites More sharing options...
mad182 Posted December 29, 2010 Report Share Posted December 29, 2010 Es kaut kā tā viņus meklēju: "#(^|[\n ]|<a(.*?)>)http://(www\.)?youtube\.com/watch\?v=([a-zA-Z0-9\-_]+)((.*?)</a>)?#ime" shurix: video ID nav noteikts garums. Quote Link to comment Share on other sites More sharing options...
briedis Posted December 29, 2010 Report Share Posted December 29, 2010 http://php.net/manual/en/function.parse-url.php Quote Link to comment Share on other sites More sharing options...
Southwind* Posted December 29, 2010 Author Report Share Posted December 29, 2010 Plds varat TC. :) 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.