phpinfo

# php -i > php.txt # vi php.txt phpinfo() PHP Version => 5.1.6 System => Linux ip-78-xxx-xx-55.ip.secureserver.net 2.6.9-023stab044.4-smp #1 SMP Thu May 24 17:20:37 MSD 2007 i686 Build Date => Jul 16 2008 19:45:51 Configure Command =>  ‘./configure’ ‘–build=i686-redhat-linux-gnu’ ‘–host=i686-redhat-linux-gnu’ ‘–target=i386-redhat-linux-gnu’ ‘–program-prefix=’ ‘–prefix=/usr’ ‘–exec-prefix=/usr’ ‘–bindir=/usr/bin’ ‘–sbindir=/usr/sbin’ ‘–sysconfdir=/etc’ ‘–datadir=/usr/share’ ‘–includedir=/usr/include’ ‘–libdir=/usr/lib’ ‘–libexecdir=/usr/libexec’ ‘–localstatedir=/var’ ‘–sharedstatedir=/usr/com’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ … Read more

create sub buckets on amazon s3

Sub buckets is very tricky task to create on Amazon S3 service… <?php include(“S3.php”); // class for REST based S3 manager $s3 = new S3(‘accessKey’, ‘secretKey’); $s3->putBucket(‘bucketname’, S3::ACL_PUBLIC_READ); /* function to upload svnlabs.txt file to subfolders s/v/n/l/a/b/s on S3 bucketname */ $s3->putObjectFile(‘svnlabs.txt’, ‘bucketname’, ‘s/v/n/l/a/b/s/svnlabs.txt’, S3::ACL_PUBLIC_READ); /* function to delete svnlabs.txt file to subfolders s/v/n/l/a/b/s on … Read more

wget – server to server files transfer

wget is powerful utility in linux. We can use “wget” to download files of any folder on any server to our server. wget will download files on local server in current folder, we can use # pwd (for current directory) # wget -H -r –level=1 -k -p http://www.domain.com/folder/ here level is folder’s level Keep downloading … Read more

float: left – anchor’s height

Today I faced a strange problem …. I have to add drop-down menu by javascript. <a href=”https://www.svnlabs.com” style=”border:2px dotted #0000FF”><img src=”svnlabs.gif” border=”0″ style=”border:2px solid #009966″ /></a> this is the code where I have to add a menu but menu dancing on this image.. when I mouse over the image menu appeared to bottom of the … Read more

MVC-model-view-controller component

General definition: Input => Processing => Output Controller => Model => View Model The model is the part of the component that encapsulates the application’s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In our case, … Read more

txt2img

Here is the code to convert text to image or simply write text on image…. <?php $img=ImageCreate (100,20); $background_color=ImageColorAllocate($img,255,205,255); $textcolor=ImageColorAllocate ($img,203,14,91); ImageString($img,3,5,5,”svnlabs.com!”,$textcolor); ImagePNG ($img, “svnlabs.png”); $img2 = imagerotate ($img, 100, 0); ImagePNG($img2,”svnlabs.png”); ImageDestroy($img); ImageDestroy($img2); ?>

DIV – Overflow Hidden

Today I got a problem to show product title in 2 lines on product’s detail page….. After some R&D……………….. I got solution by CSS to style a DIV with height for 2 line text and then overflow: hidden 🙂 I also used wordpress to wrap the text in next line for product’s description in 5 … Read more