Archive for the PHP Category
Set the User Agent With PHP cURL
cURL is a sleek way to grab contents from a URL. It's helpful in PHP where servers have banned using the function file_get_contents() . A while back I had shared a post which show on how to grab the contents of a URL using cURL. However, cURL is much more than just grabbing data. It can be used to m
Read Full PostBatch resize using ImageMagick
People who do not use or cannot use Adobe Photoshop ,whatever the reason maybe, processing large number of images could be a pain for them. And for those who use Photoshop, it could be a slow process. Using ImageMagick to resize images from Command Line is faster. It may not be as easy as click-cl
Read Full PostPNG Transparency with ImageMagick
I am sure it took you long to figure it out as to how do we change the Transparency of PNG images using ImageMagick. Same was the case with me and that is why I decided to write a post for the same. As you might be aware, ImageMagick is really awesome tool for image manipulation. It performs Imag
Read Full PostHow to pass data into Facebook iFrame application
While you are developing Facebook application you sometimes need to pass data to the application. As a matter of fact iFrame cannot access data from the parent window. Hence you cannot access certain parameters from the URL using $_GET as a usual process. Facebook provides a way to pass certain d
Read Full Postmysql.sock path in Mac OS X
In my last post I discuss how to enable PHP over Apache in Mac OS X lion and today I bumped into a new problem. The problem is that when you install MySQL on Mac OS X and try to connect it via PHP, you will get an error. This error is thrown due to the fact that the path of the MySQL sockets are dif
Read Full PostAdd PHP GD support to apache in Ubuntu Linux
PHP GD library is used to created images on the fly. This library is not installed or activated by default when you first install Apache on Linux. But GD library is used widely while developing websites. For eg. if you want to create a captcha image for a registration form, then you are going to use
Read Full PostCreating dynamic menu with re-order option in wordpress
WordPress is a powerful CMS for a website and it provides features which makes it easy to use CMS. Navigation or Menu is one of the key point of the website. People tend to change Menu names, links, reorder them ever now & then. In a normal website it is a tedious job to change menu every time y
Read Full PostUpdate your Facebook status using PHP and Graph API
In this article I am going to show you how you can update your Facebook status using simple PHP code and Facebook Graph API. This is the most naïve way to use this, you can extend this to make your own script to update your status from mobile, via cron job, via email or whatever you think makes sen
Read Full PostCheck if PHP is running in safe mode or no
Lately, I have been playing around with PHP configuration. And I realized that the runtime configurations do not change using ini_set function, if you are running PHP in the safe mode. A simple check in PHP can tell you this. Notice the code block below and which allows to check this.
Read Full PostCheck installed PHP extensions via command line
In this post we will learn how to check installed PHP extensions. The most easiest way to check is via phpinfo(); function, but at times you want to check it instantly on a remove server. Before you can run any php command from command line make sure you have php5-cli installed on your server. If
Read Full PostInstalling Apache2 and PHP5 on Ubuntu
In this post we will learn how you can install Apache2 server and PHP5 on Ubuntu. Undoubtedly, Apache2 is the most famous webserver and along with PHP, these both become the best recipes to cook pretty neat websites. Oh ! Was that too much cooking, eh ? Sigh ! let’s not get more into and comin
Read Full PostGetting started with PHP framework codeigniter
I have always worked with core PHP and was always reluctant to use any CMS (Joomla, Drupal etc). Coincidentally I never got a chance to work on any of the frameworks in PHP. But in the current project at work, we have decided to use CodeIgniter. CodeIgniter is a light weight open source web applic
Read Full PostHow to avoid fatal error Cannot redeclare function in PHP
This is for the programmers who are using functions to drive a website in PHP or there are some instances when you are using a common file which has some utility functions in it. In this kind of scenario the same file loops around on different pages and there exists this "Fatal error: Cannot redecla
Read Full PostShow Google talk status on your website
Hey People, Always wondered what could be the API which lets you interact with Google Talk ? Well I guess there isn’t one yet other than just creating bots. But what if you want to show the current Google Talk or GTalk status on your website or want it to use somewhere else like updating on twi
Read Full PostSend multiple direct messages on twitter
Howdy People, You have already learnt “How to update your twitter status ?” and also learnt how to interact with twitpic API to successfully upload images. Today I am going to show you how you can send direct message on twitter using the Twitter API and PHP. This piece of code will allow you
Read Full Post