I need help please Im recieving this error: Pretty sure its this line causing the problem $url = "http://www.youtube.com/get_video?".$videoid"&t="$vars; PHP: Can anyone help arrange the line please so it doesnt get errors? reps will be added.
$url = "http://www.youtube.com/get_video?".$videoid."&t=".$vars; dots after $videoid and before $vars;
one more thing $url = "http://youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id=IvNkGm8mxiM"; if ($contents = @file_get_contents($url)) { if (preg_match('/t>.*</', $contents, $match)) { $vars = $match[0]; echo "$vars"; } } PHP: Any help here? doesnt return anything
I tried your regexp and it gives me some results, but they are incorrect Try this one instead. if (preg_match('/t>(.+?)</', $content, $match)) { $vars = $match[1]; } PHP: If you still got nothing try echo your $content, maybe you got banned or something like that?
I got this from echo file_get_contents("http://youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id=IvNkGm8mxiM"); PHP: <?xml version="1.0" encoding="utf-8"?> <ut_response status="ok"><t>OEgsToPDskL-SqZ2g0LBxhiYl9Myv5kh</t></ut_response> Code (markup):