Category: PHP

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

Tagged with: , , ,

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); } } }

Tagged with:

Unexpected Error in new PHP 5.3

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

Tagged with:

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,

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

Tagged with: ,

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 ..

Tagged with: , ,

My Cv page updated

Go through my cv page

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

Tagged with: , ,