Thursday, June 21, 2007

Troubleshooting PHP cURL with proxies at Godaddy.com

This code block will work for Godaddy hosting accounts that require outbound connections via their proxy.

curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
//"http://64.202.165.130:3128"
curl_setopt ($ch, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

If you're using software that uses cURL but isn't working on your Godaddy account, you may have to do some modification as shown above to make it work. I prefer using the real URL vs. the IP number because they may change the IP at any time...

Of course this proxy connection is only available for Godaddy accounts. Trying to connect to it from a desktop application will not work.

-Jeffery

Thursday, June 14, 2007

Google Adwords API Tokens - Approved!

Finally. After a 2-week wait.

Your AdWords API tokens have been approved!

Congratulations!

Based on the information you provided during registration, your Developer Token and Application Token have been approved and activated for use with the AdWords API. Your approved tokens are on your AdWords API Center page (see Account details below). In the meantime, if you haven't already done so, you must accept the AdWords API Terms and Conditions and provide your billing information to be able to access the API.

About your tokens:
Each token is a unique string of letters, numbers and symbols that serves as a key for accessing the AdWords API. Both tokens must be included in all request headers for API operations. Please incorporate them into your headers as soon as possible so that you can begin accessing the AdWords API.

Account details:
Log in to your My Client Center (MCC) account at
https://adwords.google.com

Then, click on your 'My Account' tab. Here, you'll find a link to your AdWords API Center with your approved Developer Token and Application Token, as well as your latest usage stats.

Billing information:
Billing for API usage began in November 2006. The 'Billing Summary' page within the 'My Account' tab will link to invoices with details about API charges and usage. To learn more about how your credit card will be billed for API usage, please read our FAQ at:
http://www.google.com/support/adwordsapi/bin/answer.py?answer=46894



For more information:
Visit the AdWords API website at
http://www.google.com/apis/adwords/

for the latest documentation, frequently asked questions, links to the Developer's Forum, sample code, and more.


Sincerely,

The Google AdWords API Team





Note that if you are a high-volume Adwords advertiser you may also get your API tokens approved faster by calling Google Adwords staff... It worked for Larry (he's a big spender).
It may take several weeks to get approved though. So you should definitely plan ahead.
But there are ways to start developing applications without having the tokens approved yet. Just use bogus data from the API sandbox combined with data from the Adwords tools for example...

OK. So I'm just about ready to test HexaTrack... Should be all ready to go by end of next week.

After that, it's time to refocus on Silo Publisher feature upgrades and new functionality.
One of them is a keyword suggestion function for your meta tags and on-page topics for your articles to help you with keyword diversity. It won't replace Theme Zoom or anything, but will be a quick help function.

-Jeffery

Regular Expressions Checker - DHTML Goodies

Recently ran into this site:
http://www.dhtmlgoodies.com/

This site has a bunch of really cool scripts - AJAX, DHTML / PHP - with demos.

Check out their regular expression checker:
http://www.dhtmlgoodies.com/scripts/regular-expression/regular-expression.html


Pretty cool.
-j

Sunday, June 3, 2007

Google Adwords API - Sandbox Error

Got this error while testing code for the Adwords API using the Sandbox:

Message: The specified client email does not exist. Your client accounts may not exist because either this is your first time using the sandbox or the sandbox database has been cleaned. Please remove the clientEmail from the request header and call the getClientAccounts method from AccountService to ensure that your client accounts are created and do exist. Trigger: client_1+test@goinfosystems.com Code: 139 Fault Origin: /project-save.php:getNewKeywordListEstimate() SOAP Parameters: 100000000 false web hosting Broad 100000000 false web page design Broad 100000000 false web server Broad
...

To get it working again, tried changing the email to client_2... then ran TestSuite_TrafficEstimate.php but got the same error, then I removed the client email from the authentication.ini file (commented out) then ran the TestSuite file again. This caused another error saying the email was required.
I then put the original test email back in and ran the file again... and it worked without the error.
I'm assuming what the error was referring to was
http://google-apility.sourceforge.net/reference.html#account-setLoginInfo%28%24newLoginEmail%2C+%24newPassword%29


The Google API Sandbox is buggy. But there isn't much else I can use for testing while I wait for my developer account to be approved... it's been two weeks now....

If you use the API with Sandbox, be sure to switch the request headers and location to the production environment when it's time to go live!
http://www.google.com/apis/adwords/developer/adwords_api_sandbox.html

-Jeffery