by Mr Me
on January 5, 2012
in php, php source code, webworld
Those who use their on hosting inside an iframe for Facebook Fan page, there is a mechanism to pass additional parameters to your iframe page if you need to create a deep URL. A normal Fan page of Facebook would like this: https://www.facebook.com/apps/application.php?id=xxxxxxxxxx&sk=app_XXXXXX This Url will call your domain, say example.com inside the iframe to [...]
by Mr Me
on December 14, 2011
in Downloads, Flash, general, html, php, php source code, webworld
Two months ago, I published a jQuery plugin to record audio from browser (without any Media server) called jRecorder I got many responses and requests to maintain the code with new enhancements and some bug fixes. Based on that, a new version (1.1) is released which has the capability to preview the recorded audio before [...]
by Mr Me
on November 10, 2011
in general, php source code
Sometime in Facebook Pages, you can see the message / banner, we have offers for you, like us to see. Or Like us to unlock the content etc. These all are for getting more likes in their Facebook page and indeed, it is a very nice idea to spread your updates among many of your [...]
by Mr Me
on October 26, 2011
in php source code
Recently I made a jQuery plugin named jRecorder to record voice in html pages. This plugin is very easy to integrate with your web page and you DON’T need a flash server or RED5 server to do the recording What all you need is a Web Server (PHP or any server scripting language). You can [...]
by Mr Me
on June 11, 2010
in php, php source code, webworld
In PHP coding, we spend most of the time for debugging. Either we use echo, print_r or var_dump to check variable values or check whether a particular function is executing or not. These all things are outputting something to browser. This is not applicable in case of redirection, or image processing (GD) or sometimes with [...]
by Mr Me
on May 12, 2010
in php, php source code
Here is a php function which returns from and to date as an array for a range: <?php function get_rangeof_dates($time_frame = ‘all_time’) { $from_date = ”; $to_date = ”; switch($time_frame) { case ‘all_time’: $from_date = ’1170-01-01 00:00:00′; $to_date = ’2250-12-31 23:59:59′; break; case ‘today’: $from_date = date(‘Y-m-d 00:00:00′); $to_date = date(‘Y-m-d 23:59:59′); [...]
algorithm, date, download, from date, last 7 days, last month, last quarter, last week, php, php code, range, source code, this month, this quarter, this week, this year, to date, today, yesterday
by Mr Me
on June 4, 2009
in php, php source code
In a php project, if we get the requirement , we usually start design and database. But the data entry procedure is very hard. In this case PhpMyadmin is a good comfort. Here is another tool from phpguru.org , MySQL Table Editor. Using this library you can make your database table editable from your php [...]
by Mr Me
on June 3, 2009
in php, php source code
Basically using xajax “You can directly call php functions from your javascript code” Xajax will do the rest. For example, if you are going to write a javascript function Capitalize which captilaze your textbox content when you press a button. Here is the pure html/javascript code for that: ============================================= <script> function Capitalize() { [...]
by Mr Me
on November 6, 2008
in Downloads, php, php source code
If you are a social media website developer , sometimes you might search for grabbing contacts from a particular email account if the password is given. I also did the same. In most of the cases it did not work properly. But recently i got a contact grabber from phpclasses.org which works perfectly on Gmail, [...]
access, AOL, code, contact, download, email, fetch, get, gmail, grab, grabber, Hotmail, Indiatimes, Linkedin, lycos, MySpace, orkut, password, php, Rediff, yahoo
by Mr Me
on August 9, 2008
in Downloads, php, php source code
Online Photoshop in PHP Part (5) >> (image after watermarked with gmail logo) Those who haven’t seen the online photoshop tool created by me, just click here: http://www.sajithmr.com/photoshop Today we will implement the watermarking on images using php gd library. Intelligent watermarking means, apply a logo or a watermark image on another image by measuring [...]
by Mr Me
on June 5, 2008
in Downloads, php, php source code
Online Photoshop in PHP (Series Part 4) >> Today we will discuss about cropping of images using php and gd library. Look at the simple example here: http://www.sajithmr.com/photoshop-tuts/crop/simplecrop.php $x1 = $_GET['x1']; $y1 = $_GET['y1']; $x2 = $_GET['x2']; $y2 = $_GET['y2']; $image_object = imagecreatefromjpeg(‘hari.jpg’); $image_cropped = Crop($image_object,$x1, $y1, $x2,$y2); $temp_path = rand(1,99999).”hari.jpg”; imagejpeg( $image_cropped,$temp_path); header(‘Location: simplecrop.php?img=’.$temp_path [...]
by Mr Me
on May 29, 2008
in php, php source code
If you want to get the FLV file of any youtube video url using php code, here is the solution. If you are a PHP Programmer and if you are working with any video website, and if you need to grab videos (FLV files) from youtube and to put it yourown site (not object [...]
by Mr Me
on May 26, 2008
in php, php source code
Resize a Photo >> Today we will implement hows to resize photo into a particular width and height (or keeping aspect ratio) See the live example from: http://www.sajithmr.com/photoshop-tuts/resize/resize.php You need to install php-gd library to do this. To functions, imagecreatetruecolor and imagecopyresampled will do the resizing. Those who have not seen the Online Photo Editing [...]
by Mr Me
on May 21, 2008
in php, php source code
Implementation of the Browse Photos Area >> Today we will implement the browse photos area of online photoshop Those who haven’t seen the online photo editing tool, click on the above icon (baloon) You can see the browse area implementation here: http://www.sajithmr.com/photoshop-tuts/browse.php What you need for this is 4 php functions: is_dir , opendir, readdir, [...]
by Mr Me
on May 20, 2008
in php, php source code
Introduction >> As i announced in my birthday post: celebrating-1st-year-of-sajithmr.com , i am starting my post series How to make Photoshop Express in PHP Before we starting the step by step procedure, have a look at : http://www.sajithmr.me/photoshop/index.php This is a basic version of online photo editing tool. You can either upload a photo to [...]
clear all, crop, download, gd, online, photoshop, resize, round, save, undo, watermark
by Mr Me
on April 4, 2008
in Downloads, php, php source code
You can simulate the post method using php without the help of curl library. download full source code: See the code below: function do_post_request($url, $data, $optional_headers = null) { $params = array(‘http’ =>; array(‘method’ =>; ‘POST’, ‘content’ =>; $data )); if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; } $ctx = stream_context_create($params); $fp = @fopen($url, [...]
by Mr Me
on April 3, 2008
in Downloads, php, php source code, webworld
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 [...]
by Mr Me
on April 3, 2008
in php, php source code, webworld
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 [...]
by Mr Me
on February 1, 2008
in Downloads, php, php source code
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 [...]
by Mr Me
on February 1, 2008
in php, php source code
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 [...]
by Mr Me
on November 1, 2007
in Downloads, html, php, php source code, webworld
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 [...]
by Mr Me
on October 20, 2007
in linux, php source code, webworld
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 [...]
by Mr Me
on September 27, 2007
in php, php source code
Propel Random Criteria >> $c= new Criteria(); $c->addAscendingOrderByColumn(‘rand()’); $TagRs = TagPeer::doSelect($c ); ?> 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 [...]
by Mr Me
on July 10, 2007
in php, php source code
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 [...]
by Mr Me
on July 10, 2007
in php, php source code
In many cases, we , php programmers need Roman number display I II III IV etc. Here is a simple algorithm for that . 1000, ‘CM’ => 900, ‘D’ => 500, ‘CD’ => 400, ‘C’ => 100, ‘XC’ => 90, ‘L’ => 50, ‘XL’ => 40, ‘X’ => 10, ‘IX’ => 9, ‘V’ => 5, [...]
by Mr Me
on July 3, 2007
in php, php source code
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: require_once(‘smppclass.php’); $smpphost = “203.199.142.41″; // your host address $smppport = 2345; $systemid = “idsfds”; // Your system id $password = “es223″; // Your smpp account password $system_type [...]
by Mr Me
on June 26, 2007
in php source code
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! [...]
by Mr Me
on June 12, 2007
in Downloads, php source 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: extension_loaded(‘ffmpeg’) or die(‘Error in loading ffmpeg’); $ffmpegInstance = new ffmpeg_movie(‘clock.avi’); echo “getDuration: ” . $ffmpegInstance->getDuration() . “getFrameCount: ” . $ffmpegInstance->getFrameCount() . “getFrameRate: ” . $ffmpegInstance->getFrameRate() . [...]
by Mr Me
on June 12, 2007
in Downloads, php 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
by Mr Me
on June 12, 2007
in php source code
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