New preg-repleace for youtube
- by marc
Welcome,
I notice that Youtube make some changes into their website code.
Anyone have idea how make it working today ?
That's my script (don't work anymore)
preg_match('/"video_id": "(.*?)"/', $page, $match);
$var_id = $match[1];
preg_match('/"t": "(.*?)"/', $page, $match);
$var_t = $match[1];
Look at source of example Youtube video page:
http://www.youtube.com/watch?v=w_J27GxPNM0 (yes i like that song very much)
Now the t variable can be found under
<script>
(function() {
var isIE = /*@cc_on!@*/false;
I dont paste full because it's very long.
Regards