I have a script on a site that pulls in you-tube videos, The problem is, that the thumb nails for the site, no longer show up.
I have tried to add codes to remove the line causing the problem but this fails me. The code is this if anyone has a way to fix it.
<?php
function yt($ytsearch) {
global $ytcurrenttag; global $ytvids; global $ytid; $ytvids = array(); $ytid=0;
function ytinsidethetag($ytparser, $ytdata){ global $ytcurrenttag; global $ytvids; global $ytid; if(!strcmp(strtolower($ytcurrenttag),"title")) { $ytvids[$ytid]['type'] = "yt"; $ytvids[$ytid]['title']=$ytdata; $ytvids[$ytid]['title'][0] = ucwords($ytvids[$ytid]['title'][0]); }
}
function ytopentag($ytparser, $ytdata, $ytattr=''){ global $ytcurrenttag; $ytcurrenttag = $ytdata; global $ytvids; global $ytid; if(!strcmp(strtolower($ytcurrenttag),"media:player")) { $ytvids[$ytid]['link']=str_replace("watch?v=","v/",$ytattr['URL']); $ytvids[$ytid]['thumb']=str_replace("http://www.youtube.com/v/","http://img.youtube.com/vi/",$ytvids[$ytid]['link']); $ytvids[$ytid]['thumb'].="/2.jpg"; } }
function ytclosetag($ytparser, $ytdata){ global $ytid; if(!strcmp(strtolower($ytdata),"entry")) $ytid++; }