Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member duck444's Avatar
    Join Date
    Feb 2003
    Location
    east coast
    Posts
    402
    Member #
    751
    Liked
    2 times
    Some of the videos on my site that are listed under "Google Video" are not embedding the video in the watch pop up when the video is from a site other than Google Video or YouTube....For instance, if Google video is picking up a video from Daily Motion , it won't embed it on my watch page...Does anyone know how I can fix this? I have no clue...

    Here is a link to some search results that are not embedding the video...Click on the Google Video search results only to see the problem...not all the google videos are not working just some...those are the ones picking up videos from sites other than google video and youtube...

    http://tinyurl.com/96vr52

    Thanks..

    Here is the code for the page I believe controls the google videos.
    Code:
    <?php
    
    function gv($gvsearch) {
    
    
    
    	global $gvcurrenttag;
    
    	global $gvvids;
    
    	global $gvid;
    
    	$gvvids = array();
    
    	$gvid=0;
    
    	
    
    	function gvinsidethetag($gvparser, $gvdata){
    
    		global $gvcurrenttag;
    
    		global $gvvids;
    
    		global $gvid;
    
    		if(!strcmp(strtolower($gvcurrenttag),"title")) {
    
    			$gvvids[$gvid]['type']="gv";
    if ($gvvids[$gvid]['title']=='')
    			$gvvids[$gvid]['title']= ucwords($gvdata);
    			//$gvvids[$gvid]['title'][0]=ucwords($gvvids[$gvid]['title']);
    //echo  "<u>".$gvvids[$gvid]['title']."</u>";
    		}
    	if(!strcmp(strtolower($gvcurrenttag),"guid")&&strstr($gvdata,"http://www.youtube.com/watch")) {
        
        			$gv_link = str_replace("http://www.google.com/url?q=http://www.youtube.com/watch%3Fv%3D","http://www.youtube.com/v/",$gvdata);
        // echo "<b>".$gv_link."</b>";
    			$gvvids[$gvid]['link']=$gv_link;
    
    			$gvvids[$gvid]['thumb']=str_replace("http://www.youtube.com/v/","http://img.youtube.com/vi/",$gv_link)."/2.jpg";
    
    		}
    
    			
    		if(!strcmp(strtolower($gvcurrenttag),"description")&&!strstr($gvdata,"http://www.youtube.com/watch")) {
    
    			if(strstr($gvdata,"http://www.google.com/url?q=")) {
    
    			//	$gv_link = strstr($gvdata,"http://www.google.com/url?q=");
    $gv_link =str_replace("a href=http://www.google.com/url?q=","",$gvdata);
        // echo "<b>".$gv_link."</b>";
         if (strstr($gvdata,"http://video.google.com"))
         {
         $gv_link=str_replace("http://video.google.com/videoplay","http://video.google.com/googleplayer.swf",$gv_link);
         }
    				$gvvids[$gvid]['link']=$gv_link;
    
    				$gvvids[$gvid]['thumb']="na.jpg";
    
    			}
    
    		}
    
    	
    
    	}
    
    	
    
    	function gvopentag($gvparser, $gvdata, $gvattr=''){
    
    		global $gvcurrenttag;
    
    		$gvcurrenttag = $gvdata;
    
    	}
    
    	
    
    	function gvclosetag($gvparser, $gvdata){
    
    		global $gvid;
    
    		if(!strcmp(strtolower($gvdata),"item"))
    
    			$gvid++;
    
    	}
    
    	
    
    	$gvxml_parser = xml_parser_create();
    
    	
    
    	xml_set_element_handler($gvxml_parser, "gvopentag", "gvclosetag");
    
    	
    
    	xml_set_character_data_handler($gvxml_parser, "gvinsidethetag");
    
    	
    
    	include_once("fetch.php");
    
    	$gvdata = fetchrss("http://video.google.com/videofeed?type=search&q=$gvsearch&so=0&num=100&output=rss");
    
    	if(!(xml_parse($gvxml_parser, $gvdata)))
    
    		die("Error on line " . xml_get_current_line_number($gvxml_parser));
    
    	
    
    	//xml_parser_free($gvxml_parser);
    
    	
    
    	//print_r($gvvids);
    
    	return $gvvids;
    
    	
    
    }
    
    ?>

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com