user1089288
user1089288

Reputation: 99

How can we configure Google Custom search using API with PHP

I would like to use the Google Custom Search API, May i know how can we use it on PHP language. for ex:-

<?php
 $keyword = "Demo Test" ;
 $URL = "http://www.google.com/search?hl=en&q=demo+test&oq=demo+test&aq=f&aqi=g-s1g5g-v3g-j1&aql=&gs_sm=3&gs_upl=298789l300162l0l300519l9l9l0l0l0l0l274l1243l0.3.3l6l0" ;
 echo "return number of the website position"; // using method...
 ?>

it return the Number of the position of the website. previously we were using as cURL. due to the Google cURL Blockage, we are unable to search on our previous method.

Could you please suggest me any suitable way to configure it ..

Thanks

Upvotes: 1

Views: 3211

Answers (1)

Chirag Shah
Chirag Shah

Reputation: 3674

If you're using the Google APIs PHP Client, the following sample application will help you out.

http://code.google.com/p/google-api-php-client/source/browse/trunk/examples/customSearch/index.php

Upvotes: 1

Related Questions