PHP post without curl

You can simulate the post method using php without the help of curl library. download full source code: See the code below: Download the full source code from post_without_curl.zip Share

9 Comments , , , ,

OpenID Integration PHP

I think you know the use of OpenID. Else go here and learn http://en.wikipedia.org/wiki/OpenID http://openid.net/what/ http://openiddirectory.com/ In a nutshell, the OpenID technology makes life simpler by having only one username and password to remember – yahoo OpenID tour Here the php source code for integrating your site with OpenID. If you have a website which [...]

7 Comments , , , ,

Simple steps to create a wordpress theme

WordPress theme is merely a folder which is to be placed in wp-content folder of wordpress hierarchy . The basic files needed in that theme folder is index.php and style.css In this style.css the following lines are very essential. /* Theme Name: Theme Namet Theme URI: http://www.sajithmr.com/ Description: Details of your theme Author: Author name [...]

10 Comments , ,

PHP time ago calculation

The new web 2.0 displays time and date not in old style manner like 12.30 pm Jan 200 7. The new generation need relative time like 2 hours ago, 6 months ago, 4 years ago, very old etc. So if you save the timestamp of a particular content creation in database we can simply show [...]

20 Comments , , ,

PEAR – MIME Mail

When you send mail from php code, you use mail() function for this purpose. Here is another library from PEAR for sending MIME mails including html mails, attachments, inline picture attachment , plain text mail etc. The steps to install this library is : pear install http://download.pear.php.net/package/Mail_Mime-1.5.2.tgz pear install Mail (you need a pre-installed PEAR [...]

4 Comments ,

Upload Files Like Gmail

Now we can see ajax everywhere. Most of the famous websites are now enabled ajax for providing faster navigation and browsing speed. If you are a gmail user, the thing you noticed very attractively should be the file attaching part of the email composing window. If you wait for sometime you can see, your file [...]

23 Comments , ,

Trac Installation

Trac is an issue tracking system with wiki support. It also provide interface to subversion. It can be used as Web Subversion. Installation of trac > use apt-get install trac or yum install trac depends on your operating system. user this link for more installation help :http://trac.edgewall.org/wiki/TracDownload After the installation, you have to setup the [...]

2 Comments , , ,

Some More About Propel

Propel Random Criteria >> This code will give you the result in random manner. Here in this example, i show the random tags from Tag Table. Propel Memory Optimization using Result Set >> if you use $TagRs= TagPeer::doSelect(new Criteria()); The whole result of the query will be saved in $TagRs as array (Means usage of [...]

2 Comments

Php exception handling

In normal desktop applications , we use exception handling everywhere in our code. But in server side script such as php, we can limit the usage of Exception handling. Example for raising an exception in php <?php //create function with an exception function checkValue($number) { if($number>4) throw new Exception(“Value must be 4 or below“); return [...]

2 Comments

Php decimal to Roman number Conversion

In many cases, we , php programmers need Roman number display I II III IV etc. Here is a simple algorithm for that . Share

11 Comments

Smpp library in php

Hello friends, If you have a smpp account you can simple send sms / unicode to any number using php. It is very simple . Sample code is: Share

45 Comments

Amazon s3 example

Here i give you a sample code , in php, for amazon s3 file upload. Read the code carefully and try to implement. Best wishes. // grab this with “pear install Crypt_HMAC” require_once ‘HMAC.php’; // grab this with “pear install –onlyreqdeps HTTP_Request” require_once ‘Request.php’; // Note that version HTTP_Request 1.3.0 has a BUG in it! [...]

10 Comments ,

ffmpeg sample code

Install ffmpeg library in your server first. Place a video file of any type on current directory (or anywhere), here it is clock.avi . Click more for source code: //___________________________________Code end here_____________________________________ I also can be used for file format conversion Eg: exec(‘ffmpeg -i ‘.$SourcePath.’ ‘.$Destination); Here $SourcePath any file of any format , and [...]

95 Comments , , ,

Email Reading Library (Source Code)

With the support of component ezc , You can read your email via pop3 protocol. The email and password used here are only for temporary purpose. Try this code: Click more for source code: Share

7 Comments

PHP zipping algorithm

How can we zip two files and save output as output.zip. For example, in gmail you can download all the attachment as a single zip file. How can we write that code using php. Click more for Source Code: Share

7 Comments