Prefessional Book Reviews - Debt Consolidation - Debt Consolidation - Prefessional Book Reviews - WoW Gold

PDA

View Full Version : Google API php Class


noppid
Apr 22nd 2005, 10:22 pm
OK, so I wrote a google API php Class.

What would be the type of queries that one would want to display if such a tool was posted with access to the api?


Thanks

gford
Apr 24th 2005, 10:24 am
This is the exact type of thing I have been looking for.

I am not up to speed on their API but one thing I'd love is a way to pass a URL and get a nice green bar (like in the google toolbar) of that sites rank.

Once I read more on google api I am sure I'd have more requests. :D

noppid
Apr 24th 2005, 10:26 am
This is the exact type of thing I have been looking for.

I am not up to speed on their API but one thing I'd love is a way to pass a URL and get a nice green bar (like in the google toolbar) of that sites rank.

Once I read more on google api I am sure I'd have more requests. :D

Haha, good luck. :)

That seems to be the holy grail. Every php implementation I've seen of it is bassically illegal. I'm looking at cpp ATM.

I'm gonna do it correctly or not at all.

T0PS3O
Apr 24th 2005, 10:27 am
I will soon need API access to get the following:

Pass a key phrase to it, get the top N sites (probably 10-30) returned. Only need the URLs.

Will that be possible with your class? (Also new to API usage...)

noppid
Apr 24th 2005, 10:33 am
I will soon need API access to get the following:

Pass a key phrase to it, get the top N sites (probably 10-30) returned. Only need the URLs.

Will that be possible with your class? (Also new to API usage...)

The only thing I can't do with the Search API seems to be PR. Pretty much anything you can do on the search page is in the API though.

I have the toolbar API and I'm looking at trying to hook php to cpp and go from there to pull page rank. I've never tried to system call with php this way, so I have a bit to learn yet.

I'll play more next week, I'm back out to bikefest. Slept late and needed coffee so I dropped in for a few.

T0PS3O
Apr 24th 2005, 10:35 am
Cool. Make it do that for MSN and Yahoo as well and I might send you a PayPal donation...

noppid
Apr 24th 2005, 10:36 am
Cool. Make it do that for MSN and Yahoo as well and I might send you a PayPal donation...


One API at a time. This is not exactly pleasurable reading. Well for a geek it may be. LOL

But yes, the plan is all three.

T0PS3O
Apr 24th 2005, 10:42 am
How will yours be different from this one?

http://www.phpclasses.org/browse/package/920.html

noppid
Apr 24th 2005, 10:53 am
How will yours be different from this one?

http://www.phpclasses.org/browse/package/920.html

Not much at all. I don't use all those setters and getters though ATM. I don't see the point of doing it in the class when he does no security processing at all. He's basically pre-setting parameters that are passed to the methods and grabbing them in the class Vs. passing them pre-cleaned/processed via the method call.

This is not a difficult API to use at all.

Cyber-SEO
Apr 27th 2005, 10:11 pm
That's great stuff ;)

I've got to find something like this for ASP.... hmmm maybe i'll start working on one of my own :)

noppid
Apr 27th 2005, 10:20 pm
That's great stuff ;)

I've got to find something like this for ASP.... hmmm maybe i'll start working on one of my own :)

The one above is easy to use. Give it a try.

noppid
Jun 3rd 2005, 7:31 am
FYI. I had the google API working all along, but wanted to include page rank. However my code kept bombing. Turns out to be a server issue, the code actually works on my other servers.

So anyway. I'm gonna try and put together a tool that will allow you to check a websites stats that you can run or your site to attract traffic.

jlawrence
Jun 3rd 2005, 7:47 am
I'd be interested in taking a look at your API class.
I've been using nusoap (php) and soap::lite (perl) and I'm have the devils own time getting correct results from site: searches. I'm 100% certain that I'm doing something wrong, but I don't know what.
It's as if the site; results are all in the past (or only showing supplemental results).
Anyone fancy helping me with some testing ? I need someone to run an api query for me (site:www.plymouthcricketclub.com) and show me the xml sent to G and what's returned.
I'm convinced I've got a filter set somehow, but I can't see where.

noppid
Jun 3rd 2005, 7:49 am
I'd be interested in taking a look at your API class.
I've been using nusoap (php) and soap::lite (perl) and I'm have the devils own time getting correct results from site: searches. I'm 100% certain that I'm doing something wrong, but I don't know what.
It's as if the site; results are all in the past (or only showing supplemental results).
Anyone fancy helping me with some testing ? I need someone to run an api query for me (site:www.plymouthcricketclub.com) and show me the xml sent to G and what's returned.
I'm convinced I've got a filter set somehow, but I can't see where.

The php api with nusoap is what I used. It's so simple, I was kinda taken back.

I'll have to look at how I parse the XML. I'm sure I did it with basically the same array walk as I did in FREEBS. Nothing hitech.

jlawrence
Jun 3rd 2005, 8:05 am
if you could run the site:www.plymouthcricketclub.com search and send me a copy of the xml being sent to G I'd be eternally greatful - assuming you get a estimatedTotalResultsCount return of >19
I'd really like to get to the bottom of what I've got wrong with my scripts.
I can PM you a copy of my script if you wish, as it's already setup to show the outgoing xml.

noppid
Jun 3rd 2005, 8:27 am
if you could run the site:www.plymouthcricketclub.com search and send me a copy of the xml being sent to G I'd be eternally greatful - assuming you get a estimatedTotalResultsCount return of >19
I'd really like to get to the bottom of what I've got wrong with my scripts.
I can PM you a copy of my script if you wish, as it's already setup to show the outgoing xml.

I don't know what ya mean by out going XML, I've never concerned myself with it to be honest.

I'll pm you the page you can view the result I get.

I'm using a little class I'm building that uses nusoap. I use a local wsdl file and then make the call with...

doGoogleSearch($this->GKEY,$query,$start,$Max,$filter,$restrict,$safe,$lang,$ie,$oe);

Hope that helps.

noppid
Jun 3rd 2005, 9:06 am
I'm convinced I've got a filter set somehow, but I can't see where.

Following up on the PM.

As we discussed, I too think this is a filter issue for the call. Do you have the API SDK?

On the main page, APIs_Reference.html, there is a chart with a description for the passable parameters to the api calls. I think maybe restricts may be a part of the issue to.

Just how to juggle them I aint sure, or for that matter aint sure if that's correct yet. :cool:

noppid
Jun 3rd 2005, 11:23 am
if you could run the site:www.plymouthcricketclub.com search and send me a copy of the xml being sent to G I'd be eternally greatful - assuming you get a estimatedTotalResultsCount return of >19
I'd really like to get to the bottom of what I've got wrong with my scripts.
I can PM you a copy of my script if you wish, as it's already setup to show the outgoing xml.

I found this sample...


<?xml version='1.0' encoding='UTF-8'?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">00000000000000000000000000000000</key>
<q xsi:type="xsd:string">shrdlu winograd maclisp teletype</q>
<start xsi:type="xsd:int">0</start>
<maxResults xsi:type="xsd:int">10</maxResults>
<filter xsi:type="xsd:boolean">true</filter>
<restrict xsi:type="xsd:string"></restrict>
<safeSearch xsi:type="xsd:boolean">false</safeSearch>
<lr xsi:type="xsd:string"></lr>
<ie xsi:type="xsd:string">latin1</ie>
<oe xsi:type="xsd:string">latin1</oe>
</ns1:doGoogleSearch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

rspadi
Jun 7th 2005, 2:46 am
Can anyone point me to some code sources for Google API programming with .NET?

Thanks.

Shoemoney
Jun 8th 2005, 8:04 am
Can anyone point me to some code sources for Google API programming with .NET?

Thanks.

maybe you should try the api root directory and not within the php thread =p

grobar
Aug 7th 2006, 6:07 pm
That's great stuff ;)

I've got to find something like this for ASP.... hmmm maybe i'll start working on one of my own :)

I'm working on something like this (well...trying)

If you want to team up, let me know.