<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hackerdude &#187; PHP</title>
	<atom:link href="http://www.hackerdude.com/category/dev-platforms/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackerdude.com</link>
	<description>Software Development Blog by David Martinez</description>
	<lastBuildDate>Fri, 17 Sep 2010 18:31:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Searching Google with PHP through NuSoap</title>
		<link>http://www.hackerdude.com/2005/04/05/searching-google-with-php-through-nusoap/</link>
		<comments>http://www.hackerdude.com/2005/04/05/searching-google-with-php-through-nusoap/#comments</comments>
		<pubDate>Tue, 05 Apr 2005 21:21:08 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2005/04/05/searching-google-with-php-through-nusoap/</guid>
		<description><![CDATA[How to use the Google APIs to do a quick search using NuSoap. include("nusoap.php"); $soapclient = new soapclient("http://api.google.com/search/beta2"); $params = array( 'key' => 'YOUR_GOOGLE_LICENSE_KEY', // Google license key 'q' => 'related: Agile Development', // Query String 'start' => 0, // Index to start on 'maxResults' => 10, // How many to retrieve 'filter' => false, [...]]]></description>
			<content:encoded><![CDATA[<p>How to use the Google APIs to do a quick search using <a href="http://dietrich.ganx4.com/nusoap/">NuSoap</a>. <span id="more-325"></span></p>
<p><code lang="php"><br />
include("nusoap.php");<br />
$soapclient = new soapclient("http://api.google.com/search/beta2");<br />
$params = array(<br />
                'key' => 'YOUR_GOOGLE_LICENSE_KEY',   // Google license key</p>
<p>                'q'   => 'related: Agile Development',         // Query String<br />
                'start' => 0,                                  // Index to start on<br />
                'maxResults' => 10,                            // How many to retrieve<br />
                'filter' => false,                             // Remove similar<br />
                'restrict' => '',                              // Topics to restrict search<br />
                'safeSearch' => false,                         // remove adult links<br />
                'lr' => '',                                    // Language restriction<br />
                'ie' => '',                                    // Input encoding<br />
                'oe' => ''                                     // Output encoding<br />
               );</p>
<p>// invoke the method on the server<br />
$result = $soapclient->call("doGoogleSearch", $params,<br />
                "urn:GoogleSearch", "urn:GoogleSearch");<br />
// print the results of the search<br />
// if error, show error<br />
if ($result['faultstring'])<br />
{<br />
   // TODO: Print an error message or something<br />
} else {<br />
        // else show list of matches with links<br />
        ?><br />
                Google results for <b>< ?=$result['searchQuery']?></b>:<br />
                < ?=$result['estimatedTotalResultsCount']?> hits.<br />
                < br><br />
                < ul><br />
                < ?<br />
                if (is_array($result['resultElements']))<br />
                {<br />
                        foreach ($result['resultElements'] as $r)<br />
                        {<br />
                                echo "< li>< a href=" . $r['URL'] . ">" .<br />
                                        $r['title'] . "";<br />
                                echo "< br>";<br />
                                echo $r['snippet'] . "(" . $r['cachedSize'] .<br />
                                        ")";<br />
                                echo "< p>";<br />
                        }<br />
                }<br />
        ?>< /ul>< ?<br />
}</p>
<p></code></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2005/04/05/searching-google-with-php-through-nusoap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

