Monthly Archives: May 2006

Google Adsense API is here


It is official now!

Here are the key features for the API:

What can I do with the AdSense API?

Using the AdSense API, you can enable users to perform a variety of AdSense functions without leaving your website, including the following:

– Create an AdSense account
– Manage an AdSense account
– Create and modify AdSense for content ad units and link units, AdSense for search boxes, and Referrals
– View detailed reports to monitor performance and earnings

How does the AdSense API benefit your site and users?

By making it easy for publishers to sign up for AdSense and generate revenue, the API offers another compelling reason for publishers to choose your service over a competitor’s–and remain loyal to you. The AdSense API is great for publishers who don’t want the hassle of setting up their own accounts or dealing with cutting and pasting HTML snippets.

How does this generate revenue for you?

Approved AdSense API developers will receive a share of the revenue earned by the publishers you’ve signed up. In addition to the revenue share, you’ll also receive $100 each time a new publisher you’ve signed up earns $100 in less than 180 days. This means that developers who currently charge for services can now use the AdSense API to offset some of the costs of your services–maybe even making it possible to offer your services free of charge.

Additionally, as the developer, you can optimize your ad’s placement, color, and format to increase your users’ earnings–and your users don’t have to do any additional work to display optimized ads.

I think this is not a good move by Google. An average Social Networker, networks for fun and to meet people. He does not care if he makes a couple of dollars in a week or so by his posts. Ofcourse, who doesn’t love getting extra money, but I think an average US visitor wouldn’t bother too much about the petty cash. Social Networkers from other countries, where a dollar holds a lot of value, might be the people who would love to earn some petty cash while having fun.

Right now Adsense is looking for web hosts, blog hosts, Wiki hosts, forum hosts, and web publishers to participate in the beta program and they should have atleast 100,000 pageviews a day. I think this is a great start, but thats it. The members posting/writing for these websites would be motivated to earn money and would write SEOed articles/posts. I don’t think an average Myspace user will be motivated enough to research on the topic. Find out the topic’s avg. CPM and then strategically place the keywords in the article. I think that Adsense API is not going to be a really big thing. It is good for pulishers but even better for Google.

I wasn’t expecting the API to be a revenue sharing model, but expected something that would help existing publishers track their earnings on a page basis rather than channel based stats.

I think if the publisher can insert some unique values into the Adsense code dynamically, he can track more efficiently. For example, if a blogger can insert the post’s id or title in the adsense, he can keep track of what posts are doing the best, which post has the max CTR, what topic generates Max CPM for him, so that he can concentrate writing on it..etc.

Google can further help its publishers by integrating Analytics with Adsense APIs. Then a blogger can find out that his post on “Travel to Asia” generates a lot of revenue from visitors in New York and San Francisco. This will help him to enhance his post by adding information such as, how is weather in Asia as compared to New York or SF, how long does it take to fly to China from NY and SF…etc.

Zookoda

I read about Zookoda at problogger. I investigate more about RSS 2 Email services and found this helpful link. I think I would have liked Yutter too, but I already had signed up w/ Zookoda, so I used it for one of my upcoming blogs.

I had another idea of “contextual” email subscription since a few weeks, but wasn’t sure how to handle a bulk of emails. Now, I think Zookoda might have a solution for me. Below is the message that I sent to them.

Hi,

I like the service so far. It is really simple and powerful.

I wanted to build a subscription system for my another website, but I think it will take up a lot of resources. Here is what I wanted and would love to see in Zookoda:

I have a feed with News articles and each article is tagged with a few tags. I wanted to have a tag based subscription. Ex: If I subscribe for the newsletter for the tag ‘ipod’, then I should receive an email (instantaneous or a digest) for all the News articles that are tagged with ‘ipod’.

I can easily send the tag to Zookoda, when the user submits the form with his/her email address. Zookoda should be able match that tag with what is in the feed and thus send the relevant post(s) to the subscriber. This system should also be able to handle multiple tag subscription and hence aa subscription manager (page) for the subscriber.

Please let me know if this is something you can provide.

Thanks, Gaurav

Initially, I wasn’t thinking of writing this application using feeds, but my internal db. Mapping the subscribers to the tags is hardly an issue with me. The only problem I have is handling such a huge amount of processing and email sending. My problem is that, I will have to create a custom newsletter for each of the subscriber and then email it to them. If there are only a few subscribers (less than a hundered), it should be OK, but if there are a several 100 subscribers, some kind of system would be required to send emails in batches.

Does anybody know of any software/service that can handle a huge number of distinct emails for each subscriber? How does the mailing list softwares handle the email sending?

Gmail is gone

Yikes…. ain’t that a scary thought?

My sister called me around 10ish on friday morning. She was nervous because gmail.com was allegedly “hacked”. She was in some comp. lab @ CSUEB

She told me that it says gmail.com is up for sale (like one of those parked domains etc.) I thought I knew what exactly was wrong and I told her the most obvious thing… check the address bar you might have a typo in the url. She re-checked it and confirmed it. I was bit surprised and refreshed my gmail window (CTRL+R and not the inbuilt refresh) and gmail wasn’t hacked for me…

I thought it might be some kind of mental block where she can’t spot the wrong spelling etc (happens to me sometimes.) To prove my theory, I asked her to goto google.com (which wasn’t hacked for her) and then type gmail and then click the link. This would make sure there is no typo. She did it and still landed on the same page. This shocked me, because my sister is not computer illiterate and what she is saying might be true. But I was still wondering how come gmail.com is “unhacked” for me? She tried to access gmail.com using the adjacent computer and had the same result.

She had to leave, so I asked her to take a screenshot of the so called “hacked” gmail and mail me using her Y! mail. I got the jpg screenshot in my gmail after a couple of minutes and was shocked to see she was right. Here is the screenshot

Gmail is gone

I still don’t know what happened, but I think I can make out what this is. I think it is some kind of Spyware which plays around the windows dns resolver and somehow hardcodes mapping b/w some ip address with the domain name gmail.com. I might be wrong, but that is the best I can think of.

I think this kind of spyware can be seriously dangerous, what if the “domain for sale” was replaced by a clone of gmail’s login page? Or even worse bankofamerica.com is infected by this and is forwarded to a clone of the original web site?

I’d love to know more about this so called spyware or is it something else. Did somebody else also noticed this kind of behavior somewhere else? I googled about it, but couldn’t find anything.

Object Oriented PHP

I have had a strange relationship with Object Oriented Programming. I always wanted to program in OO, but for one reason or the other did not (or shall, I say could not.) I first started OOP with C++ while studying. The whole concept of OOP appeared to be complex and I could not see much use for it. I was happy with the good ‘ol functions and random code snippets. I wrote code in OOP for homework where it was must.

Then, I learned PHP from here and there. I forgot functions and started writing random code. If I had to reuse some code/functionality, I preferred copy pasting the 10 – 15 lines of code rather than writing a function. This was the time when I was learning PHP and trying to write “fun” scripts, which would echo viewer’s IP Address, play around with strings, etc.

Once I started taking apart some serious applications such as CMSes, Buletin boards, etc. I realized the importance of functions. It was so easy to change one line of code (in a function) in a 150 line script (which was one of 30 or so files) and see the change wherever that function was called. I realized how important was ‘include()’ in PHP.

After this, there was a time in my life when I started writing my own code and developing some applications/web sites completely by myself. I was happy with the functions but wanted to venture out with the new OOP PHP.

It all happened with one of my first projects (I guess an year ago?) While planning for the project, I decided to use classes. The planning phase passed, I started coding. When I was almost done with the coding, I realized there wasn’t a single class in my 9 – 10 file big project. Defiantly there were a lot of functions.

After a few months, I had another idea and started working on it. I remembered the pain from copy pasting ‘mysql_fetch_array’ etc. So, I again decided to code using classes. This time I had some success. I at least wrote a couple of classes. One of them was an abstraction layer over mysql. It made my life much easier with all those queries. It was more like plug n play.

Now, I am working on another project and I (firmly) decided that I would write the whole application in OOP. So far I have had 95% success, there are about 3-4 classes. This is an extensive project, which might include well above 50 – 60 files. Creating classes for certain tasks might be an overkill, so I would refrain myself from doing so. I think the classes have made my life much easier this time. I can see that the coding for the front end would be a piece of cake and defiantly much cleaner.

If OOP made life easier (my teachers told me that too), then why do I keep going to the un-organized coding? I thought about it a bit and came up with the most likely reason. I and may be most of the other coders get ideas instantaneously. There are times when I am sitting in front of the computer at 1:30 in the night and suddenly some wicked feature for my site would strike me. Instead of waiting, noting it down, planning, I would straight away jump and start writing the code in the fastest way I can. The fastest way generally is to write the code in an un-organized fashion. I would write a few lines and then look at the application (and feel happy) and keep doing this recursively until I achieve the feature that struck me. If I get addon ideas, I would keep appending them to the code that I wrote and never revisit the code to “beautify” it as it is perfectly functional on the web site.

I am sure a lot of other programmers do the same. I think it is time to change the habit and be more planned about the addons/features as I am planned about the initial project.

BTW for those of you who don’t know much about PHP OOP, here are a couple of tutorials about OOPing in PHP.

Spoono

PHP freaks