RSSAll Entries in the "PHP" Category

Image Resize Simple class

Image Resize Simple class

Here is a sample class file for image resize. imageResize.class Download the File  save it in web root and add .php extension to the file  . How to use ? <?php require_once(‘imageResize.class.php’); // Path to File imagejpeg(imageResize::Resize($fileSavePath,$width,$height),$newFileName); ?> $fileSavePath should be the pathname of source file. Say “uploads/arun.jpg”. $newFileName this should be the source File [...]

Symfony 1.2 File Upload

class mymoduleActions extends sfActions { public function executeUpload($request) { if ($request->hasFiles()) { foreach ($request->getFileNames() as $uploadedFile) { $fileName = $request->getFileName($uploadedFile); $fileSize = $request->getFileSize($uploadedFile); $fileType = $request->getFileType($uploadedFile); $fileError = $request->hasFileError($uploadedFile); $uploadDir = sfConfig::get(‘sf_upload_dir’); $request->moveFile($uploadedFile, $uploadDir.’/’.$fileName); } } }

Unexpected Error Caused while upgrading php 5.3

Unexpected Error in new PHP 5.3

Syntax Error , Unexpected ‘]’ in C:\xampp\php\browscap\browscap.ini on line 297.

What is PHP and its advantages and disadvantages..

Hypertext Preprocessor :: PHP some time  I used to call Personal Home Page PHP is an open source server side scripting language that mainly used for developing web applications and web services. The PHP is very simple for a beginner, but offers many advanced features for a professional script writer. Three main areas where PHP [...]

Asterisk Callme Architecture with PHP AGI

Extensions Configuration extensions.conf [callme] exten => s,1,AGI(callme.php|${CNUM}) CNUM is the variable passed to callme AGI Script Callme.php Agi Script #!/usr/bin/php /** * Author Arun Raj R * @package phpAGI_for Call me * @version 1.0 */ set_time_limit(30); require_once(“phpagi/phpagi.php”); $agi = new AGI(); $agi->answer(); $result=$agi->stream_file(“welcome_to_call_me”); $cid = $argv[1]; $agi->exec(“Dial Zap/g0/”.$cid, null); ?> PHP File to run callme [...]

PHP:: How to split a large array in small pieces :: or split array into chunks

Hello All, Yesterday i was searching for a solution to split large array into small pieces. Suddenly i noticed the that php have a built in function to split array into small pieces. It was very surprise to me .. Here it is Function : array array_chunk ( array $input , int $size [, bool [...]

My Cv page updated

Go through my cv page http://arunrajr.com/blog/my-cv/

PHP code to find Duration of an Audio File

Here is the PHP function to calculated duration of “wav” or “GSM” files First we open file using fopen. After we calculate the size of that file (inbytes) using filesize(). Then we unpack the audio File . unpack(‘vtype/vchannels/Vsamplerate/Vbytespersec/valignment/vbits’,$rawheader); This will return following array Array ( [type] => 1 [channels] => 2 [samplerate] => 44100 [bytespersec] [...]

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin