Archive for the PHP Category
Change default php.ini values using .htaccess
Hey Folks, As you might be knowing that php.ini is the configuration file for the PHP and resides at the server. It contains all the options/settings for the PHP language. There are instances you need to change these options. In local environment you can change these settings very easily b
Read Full PostCheck username availability and validation using ajax,php
So you are creating a signup form and you want to create a fancy looking username validation Ajax script. I know that looks fancy when you signup for Gmail or Yahoo mailbox, instead these kind of validation are now on every signup form. We are going to create this simple script using Javascript, A
Read Full PostMagic methods in PHP
PHP has lot of magic stored in it. Magic methods in PHP is one way to witness it. These methods are executed automatically on certain event or situation. The function names __construct, __destruct, __get, __set etc are known as magic methods in PHP classes. That means these function names are reserv
Read Full PostHow to shorten and get stats of a URL from bit.ly API using PHP
Hey Geeks, So in the era of shortening URLs you lost the track what users are coming from where and what is the original source of traffic. Well there is nothing to worry since bit.ly keeps track of all your URL which are shortened by its API. Bit.ly not only shortens the long URL of your webpage
Read Full PostPost pictures on twitpic API using PHP
Hey Folks, In this post we are going to learn, How you can post picture to twitpic.com using the API services provided. It is very simple to send request to the API and post the picture on twitpic. You can also specify if you want to tweet about the picture to your twitter's timeline or no. The f
Read Full PostSend binary data using curl php
In this post , you will learn how you can send binary data through cURL in php. You might want to send binary data like image in some of the API calls viz Picasa API, Twitpic API etc. If you send the image file as it is, it will passed to the API request as passed over the http, using content-type
Read Full PostDynamically display twitter display image of a user
You might have wondered as to how a blog or a web-page displays you twitter image when you leave a comment there ? Well there is no rocket science involved in it and I planned why not create a small class for you through which you can show off little extra of your twitter love to the visitors. We
Read Full PostGet data from a URL using cURL PHP
Hey Folks, There are times when you need to fetch data from certain URL. This URL can give you RSS feeds or it can be a JSON data. But while writing a script you may often face challenge to fetch the contents from the URL. Some programmers use file_get_contents() function of PHP to get the data f
Read Full PostWrap text when creating images on the fly in php
Hey People, Wonder how could you insert line breaks, or make your string wrappable when you are creating images on the fly in php. I bet before you hopped in here, you must have tried inserting \n,\r,<br> using function wordwrap(); However its slightly different and the strings on images a
Read Full Postlogging 404 errors on your site and generating traffic from it
Hiya People, Its really a pain when visitors come down to your blog and they see "Sorry, but you are looking for something that is not here." The message can be anything, but top of everything it is nothing but a fail message. And consequently, many of your potential visitors may bounce off yo
Read Full PostIntegrating Google Analytics in Mediawiki
In this post, we will talk about how to hack the Mediawiki Template to include Google Analytics without tracking the sysop user. The better way is, obviously, to use the GoogleAnalytics Extension (which would be discussed in a later post). This hack applies to Mediawiki 1.9.3+ In the mediawiki/
Read Full PostHow to send tweet message on twitter using php
Hey Folks, I have written a complete class which sends tweet and performs other stuff on twitter from following user to deleting Direct messages etc. But its just that I am not able to post the whole class here and explain it. I am gonna release a beta version of the class pretty soon with comple
Read Full PostCreate image in PHP using GD with different font , size
Heya, It is going to be pretty basic tutorial. I am gonna write the advanced or the other ones in the next tutorials. Here is a simple code in php which creates a image on the fly. This code is so simple,but i have written comment before each line to help you understand the flow of the code.
Read Full PostHow to use HTTP_POST_VARS in php
HTTP_POST_VARS was a very useful global array, but we dont use it these days. I do not understand or i did not find time to research if it has been discontinued or had some problem. But it was quite a nice array which stored all the fields and their values of a html form into a key-value pair array
Read Full Postcalculating time difference in PHP
Date and time is one function which is always like there in whatever website, project you create. The more simple they look like to start with the more complex they become. Complexity comes in when we put these functions into different loops conditions etc. Well Today i got a bug in some code and it
Read Full Post