Welcome to WebmasterWorld Guest from 54.158.36.59

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

I want to...

plz anyone help me, who is well in php

     
12:44 pm on Feb 4, 2004 (gmt 0)

10+ Year Member



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]

8:53 pm on Feb 4, 2004 (gmt 0)

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



I don't see why you can't have the script swap keys if it gets no response using the first.
8:57 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

8:58 pm on Feb 4, 2004 (gmt 0)

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



I was thinking the same thing Timotheos

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

10:31 am on Feb 5, 2004 (gmt 0)

10+ Year Member



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?

6:42 pm on Feb 5, 2004 (gmt 0)

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



You could always count requests, store them somewhere (db?) with a date and then swap after the set number of queries on that day.
7:38 pm on Feb 5, 2004 (gmt 0)

10+ Year Member



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

Did any of you want to help me?

8:44 pm on Feb 5, 2004 (gmt 0)

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



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.

11:25 am on Feb 6, 2004 (gmt 0)

10+ Year Member



Ok, Thanks for ur suggestions.
I have asked someone else and he helped me. :)
11:57 am on Feb 6, 2004 (gmt 0)

10+ Year Member



[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";

 

Featured Threads

Hot Threads This Week

Hot Threads This Month