Apache/PHP

Installing PEAR for PHP

Posted by amit on September 1, 2010 at 10:17 am

Installation
For Windows:

To update your PEAR installation, request http://pear.php.net/go-pear in your browser and save the output to a local file go-pear.php.
Assuming you have installed PHP already, and it is runnable from the command line type php go-pear.php

For FreeBSD:

Add the PEAR DB package from the ports /usr/ports/databases/pear-DB

Test [...]

Automated Web Testing

Posted by amit on August 25, 2010 at 6:39 am

We have now adoped Selenium for automated web application testing. This increases the quality level of our software and generates better confidence for our clients.

How to save a remote image to local disk

Posted by amit on July 30, 2010 at 8:42 pm

$image_url = “http://example.com/image.jpg”;
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $image_url);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
// write to local file
$f = fopen(’/home/www/path/image.jpg’, ‘w’);
fwrite($f, $image);
fclose($f);
// output to browser
header(”Content-type: image/jpeg”);
print $image;
?>

Automated member registration for phpBB

Posted by amit on November 4, 2008 at 6:22 am

A lot of websites may require phpBB plugged-in as an add-on to the main site. In such a case if the main website already has a membership module in place, then it is desirable that when a member signups on the main website, he also becomes a member in phpBB.
There are 3 ways of doing [...]

Installing Apache 2.0.* with PHP 5.* in Windows

Posted by amit on November 26, 2006 at 10:16 pm

Much documented as the above process is, a lot of people still get stuck in some part of the installation process or the other (me included). It is not a complicated process really, its just that there are some simple tips and tricks which people have learned the hard way and these tips and tricks [...]