homepage Welcome to WebmasterWorld Guest from 54.211.230.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
I want to...
plz anyone help me, who is well in php
fahad

10+ Year Member



 
Msg#: 2769 posted 12:44 pm on Feb 4, 2004 (gmt 0)

I'm using a script which uses google web API to get results. It wants a google key. You can view my site.
As google sets the limit for per user query for everyday. I finish my limit in half of day. So, I want script to use another key after it finishes the limit of first key.

If anyone help me so..plz tell me I'l be posting that script here.

[edited by: jatar_k at 8:52 pm (utc) on Feb. 4, 2004]
[edit reason] no specific sites thanks [/edit]

 

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 2769 posted 8:53 pm on Feb 4, 2004 (gmt 0)

I don't see why you can't have the script swap keys if it gets no response using the first.

Timotheos

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2769 posted 8:57 pm on Feb 4, 2004 (gmt 0)

Beware.... from the Google API FAQ

10. Can I create more than one Google Account to get multiple license keys?

No. The terms and conditions you agree to restrict you one account for your personal use. Users who attempt to create more than one account are subject to being banned from the Google Web APIs service.


jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 2769 posted 8:58 pm on Feb 4, 2004 (gmt 0)

I was thinking the same thing Timotheos

Just because you can do something doesn't mean you should

fahad

10+ Year Member



 
Msg#: 2769 posted 10:31 am on Feb 5, 2004 (gmt 0)

I know that multiple accounts are not allowed, but the other key is not registered by me. One of my friend registered it. And this site is owned by me and my friend. So, half of day site will use my key and rest of the day, script will use my buddy's key. :D True.

Anyone help?

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 2769 posted 6:42 pm on Feb 5, 2004 (gmt 0)

You could always count requests, store them somewhere (db?) with a date and then swap after the set number of queries on that day.

fahad

10+ Year Member



 
Msg#: 2769 posted 7:38 pm on Feb 5, 2004 (gmt 0)

I can't do it daily.
I want script to do this automatically.

Did any of you want to help me?

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 2769 posted 8:44 pm on Feb 5, 2004 (gmt 0)

I want script to do this automatically

I realize this, maybe I should have been more specific

Your script could always count requests, store them somewhere (db?) with a date and then swap after the set number of queries on that day.

<added>the only reason I mention date is so that every night at 0001 it can reset the count.

fahad

10+ Year Member



 
Msg#: 2769 posted 11:25 am on Feb 6, 2004 (gmt 0)

Ok, Thanks for ur suggestions.
I have asked someone else and he helped me. :)

Helza

10+ Year Member



 
Msg#: 2769 posted 11:57 am on Feb 6, 2004 (gmt 0)

[OEPS :( sorry missed the previous message saying you already fixed it..]

----
The most dirty methode i know :)
this code just picks a random key everytime you run the script ;)

for php4:

srand((float) microtime() * 10000000); // not needed if you use PHP4.20 or higher
$input = array("KEY_1", "KEY_2", "KEY_XXX");
$rand_keys = array_rand($input, 1);
echo $input[$rand_keys[0]] . "\n";

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved