Twitter bot tutorial

by Php Ninza on February 21, 2010

Twitter is heavily becoming a source of traffic and with there extremely powerful api , it’s very easy to automate stuff via Twitter bots.

Today i am going to show you a tutorial for very simple but yet very powerful bot which if used effectively can drive great traffic on sites. These bots simply search twitter stream for predefined keywords and tweet target messages to the tweeters. These bots can be set via cron to read stream every few minutes and make responses in real time.

For newbies and starters all Twitter API documentation can be found here , From here we are going to use Search API methods and Status Update REST api method for sending predefined tweets to the users.
[click to continue…]

{ 9 comments }

Open Dada PHP Class – Ringtone Affiliate API

by Php Ninza on August 31, 2009

Recently i needed to make a ringtone download website for a friend and we researched on web for a good affiliate with a decent API to make things easier for content download and integration on website.

We ended choosing OpenDada.com which is a affiliate website for dada.net , Dada.net is a premier provider for providing ringtones and other mobile content.

The API documentation for OpenDada can be found at API docs page .

There are four methods that are defined in the class, Namely they are:-

search_ringtone(“ARTIST NAME”);

top10();

display_single_ringtone(“ARTIST NAME”, “SONG TITLE”);

get_genre(“GENRE”);

All methods are explained in the example.php file and can be found  here.

Todo List:-

1) Add functionality to get more than 10 ringtones.
2) Put the class in phpclasses.org
3) Add option of inserting partner id

Will update the class with more functionality sooner.

{ 5 comments }

5 important tips for Debugging PHP Code

August 29, 2009

Debugging PHP code is a  nightmare for all Php developers and these are the times when they miss the thread functionality like java in php, However some simple php debugging techniques can help y0u to code faster and thus save very valuable coding time.
These all debugging techniques are based on my experience and i would love [...]

Read the full article →

Protected, Private and Public classes – The Difference

August 23, 2009

PHP5 allows developers to create public , private and protected methods and properties. They can be defined as :-
Protected:- The specified class and subclasses of that class can use the methods of that class
protected class Test
{
$dead = false;

function human()
{
}

function set($dead)
{
$this->dead = “true”;
}

}

Read the full article →

Enable mod_rewrite in windows , WAMP, XAMPP

August 22, 2009

Wamp and XAMPP doesn’t come with default rewrite rule enabled, For enabling the rewrite rules in both of them you need to make changes in httpd.conf so that apache can work with rewrite rules.
For enabling the rewrite rules follow these rules:-
1) find httpd.conf (usually this file can be found in folder callled conf , config [...]

Read the full article →

Creating a cache file in php for API requests

August 21, 2009

Web 2.0 was all about mashups and data api’s !, Some of the popular ones are google search api , twitter api etc.
All API’s have some rate-limiting , For example Twitter API has a rate limit of 150 requests per hour ! , Yahoo API and Google API’s have a daily limit on their requests.
The [...]

Read the full article →

5 upcoming Apis of Google that will change the way mashups are made

August 9, 2009

In my opinion one of the top most API’s used globaly on web portals is Google Search API, Google is famous for building world class API’s to harness the unique data Google collected with it’s excellent set of technology.
Google Labs is the ultimate playground of Google which he use for developing and testing there upcoming [...]

Read the full article →

Godaddy Coupon code for 2009 , Get a .com in 6.99

August 4, 2009

I bought a few domains lately and found these godaddy coupon code to buy the domains in 6.99 USD. Hope this helps some of our fellow developers.

6.99 .com Domain, Coupon Code:- goaz2001ai
6.99 .com Domain, Coupon Code:- goaztk03a

Read the full article →

Handling Php errors and exceptions

August 3, 2009

Elegant Ways of Handling PHP Errors and Exceptions
View more documents from ZendCon.

Read the full article →

7 jQuery code snippets a programmer need daily

August 2, 2009

Usually programmers use a lot of JavaScript code snippets as functions regularly, These JavaScript functions are lengthy code snippets and are usually tough to understand and edit. Some of the most common functions used are form validation functions , Pagination functions etc.
The day since jQuery has been on the block , It has provided a [...]

Read the full article →