Find jobs - Cheat Codes - Apartment Budapest - Find jobs - Debt Consolidation

PDA

View Full Version : Querying Google


netaddict
May 8th 2005, 10:48 am
Using PHP, I need to query google using my API key and need to store the number of results in a variable.

How can it be done? Any idea? :)

siraxi
Jul 21st 2005, 1:23 pm
Me too !

Anyone willing to share ?

jimrthy
Jul 21st 2005, 1:26 pm
Sorry, I've only done xmlrpc with python. I am curious to see how it compares, though.

Okay, I was curious enough to do some research. xmlrpc with php is ugly!

Here's the basics of what you need:

<?php

// Generate the request

// I think this should be an array of the parameters you're passing in, instead
$params = "system.methodSignature";
$method = "system.methodHelp";
$request = xmlrpc_encode_request($method,$params);
echo ( $request );

// Send the request
// What's user_data??
xmlrpc_server_call_method( $server_address, $xml, $user_data );

Wow, the documentation on this is horrible. I'll definitely be sticking with python for my xmlrpc needs.