Tag Archive for google

HTML5 Beginers Layout With Google Ajax Load

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>HTML5 Beginers Layout</title>
<script type="text/javascript" src="<a href="http://www.google.com/jsapi"></script>" >http://www.google.com/jsapi"></script></a>
<script type="text/javascript">
google.load("jquery", "1.4.2");
google.load("jqueryui", "1.8.2");
</script>
<!--[if lt IE 9]>
<script type="text/javascript" src="<a href="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>" >http://html5shiv.googlecode.com/svn/trunk/html5.js"></script></a>
<![endif]-->
</head>
<body>
    <header>
        <hgroup>
            <h1>Page Header</h1>
            <h2>Description May Go Here</h2>
        </hgroup>
    </header>

    <nav>
        <ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">Contact</a></li>
        </ul>
    </nav>

    <article>
        <header>
            <h1>Article Header</h1>
            <time datetime="2010-05-05" pubdate>June 25th 2010</time>
        </header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        <section>
            <header>
                <h1>Section Header</h1>
            </header>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
            <footer>
                <p>Section Footer</p>
            </footer>
        </section>
        <footer>
            Article Footer
        </footer>
    </article>

    <aside>
        <header>
            <h1>Siderbar Header</h1>
        </header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </aside>

    <footer>
        Page Footer
    </footer>

</body>
</html>

source

HTML5 Basic Template (w /Google Load)

<!DOCTYPE html>
<html lang="en">
<head>
<title>Webpage Title</title>
<meta charset="utf-8" />
<script src="<a href="http://www.google.com/jsapi"></script>" >http://www.google.com/jsapi"></script></a>
<!--[if lt IE 9]>
<script src="<a href="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>" >http://html5shiv.googlecode.com/svn/trunk/html5.js"></script></a>
<![endif]-->
<script>
  google.load("jquery", "1.4.2");
</script>
</head>
<body>

</body>
</html>

source

How to get images from Google images with PHP

function getGoogleImg($k) {
	$url = "<a href="http://images.google.it/images?as_q=##query##&hl=it&imgtbs=z&btnG=Cerca+con+Google&as_epq=&as_oq=&as_eq=&imgtype=&imgsz=m&imgw=&imgh=&imgar=&as_filetype=&imgc=&as_sitesearch=&as_rights=&safe=images&as_st=y";" >http://images.google.it/images?as_q=##query##&hl=it&imgtbs=z&btnG=Cerca+con+Google&as_epq=&as_oq=&as_eq=&imgtype=&imgsz=m&imgw=&imgh=&imgar=&as_filetype=&imgc=&as_sitesearch=&as_rights=&safe=images&as_st=y";</a>
	$web_page = file_get_contents( str_replace("##query##",urlencode($k), $url ));

	$tieni = stristr($web_page,"dyn.setResults(");
	$tieni = str_replace( "dyn.setResults(","", str_replace(stristr($tieni,");"),"",$tieni) );
	$tieni = str_replace("[]","",$tieni);
	$m = preg_split("/[[]]/",$tieni);
	$x = array();
	for($i=0;$i<count($m);$i++) {
		$m[$i] = str_replace("/imgres?imgurlx3d","",$m[$i]);
		$m[$i] = str_replace(stristr($m[$i],"x26imgrefurl"),"",$m[$i]);
		$m[$i] = preg_replace("/^"/i","",$m[$i]);
		$m[$i] = preg_replace("/^,/i","",$m[$i]);
		if ($m[$i]!="") array_push($x,$m[$i]);
	}
	return $x;
}

source

google keyword tool

<a href="<a href="http://www.bestgooglekeywordtool.com">google" >http://www.bestgooglekeywordtool.com">google</a> keyword tool</a>

source

Google-Analytics

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "<a href="https://ssl."" >https://ssl."</a> : "<a href="http://www.");" >http://www.");</a>
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XYZXYZXYZ-X");
pageTracker._setDomainName(".xyzxyz.xyz");
pageTracker._trackPageview();
} catch(err) {}</script>

source

Google Analytics Blank Template

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "<a href="https://ssl."" >https://ssl."</a> : "<a href="http://www.");" >http://www.");</a>
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}
</script>

source

Zoom to Markers in Google Maps API

function fitMap( map, points ) {
   var bounds = new GLatLngBounds();
   for (var i=0; i< points.length; i++) {
      bounds.extend(points[i]);
   }
   map.setZoom(map.getBoundsZoomLevel(bounds));
   map.setCenter(bounds.getCenter());
}

source

jquery google map init

<script src="<a href="http://maps.google.com/maps?file=api&v=2&key=ApiKeyinizBurayaYazılacak&sensor=true"" >http://maps.google.com/maps?file=api&v=2&key=ApiKeyinizBurayaYazılacak&sensor=true"</a>
        type="text/javascript"></script>
       
    <script type="text/javascript">
 var geocoder;
 var map; 
 function initialize() {
 var geocoder = new GClientGeocoder();
 var map = new GMap2(document.getElementById("map_canvas"));
   geocoder.getLocations("Istanbul , TURKEY", function(result){
          if (result.Status.code != 200) {
            alert('Could not geocode "' + result.name + '"');
            return;
        }
          place = result.Placemark[0];
          point = new GLatLng(place.Point.coordinates[1],
                              place.Point.coordinates[0]);
          map.setMapType(G_HYBRID_MAP);
          map.setCenter(point, 8);
          marker = new GMarker(point);
         map.addOverlay(marker);
         alert("OK");
          marker.openInfoWindowHtml(place.address);
    
   });
 
 }
  
    $(document).ready(function(){
     initialize(); 
    });

source

Number of pages on the web linking to a particular domain

<a href="http://www.google.com/search?as_lq=<DOMAIN>

" >http://www.google.com/search?as_lq=<DOMAIN>
source

Google AJAX Libraries API

<script src="<a href="http://www.google.com/jsapi"></script>" >http://www.google.com/jsapi"></script></a>
<script>
  // Load jQuery - simply call it here, and name the version after it  
      google.load("jquery", "1.3.2");
</script>

source