PHP related blog, freelancer to hire!

Blog

sFTP for PHP 5.xx

Install SSh2 extension for PHP, then you can use class below: <?php /** * Class to deal with sFTP connections * to use install http://php.oregonstate.edu/manual/en/ssh2.installation.php * */ class SFTPConnection { private $connection; private $sftp; public function __construct($host, $port=22) { if (!extension_loaded(‘ssh2′)) { throw new Exception(“Extension ssh2 has

Read more

PHP CLI Progress Indicator

Today I wanted to create some progress indicator PHP command line, after minute googling I found http://forums.devshed.com/php-development-5/php-cli-progress-indicator-151590.html After slight change: function progressBar($current, $total, $label) { $percent = round($current / $total * 100); if ($current == 0) { if ($label == “”) echo “Progress: \n”; else if ($label

Read more

HTML code in Zend Forms description

If you want to use HTML as description in Zend Forms use : $name = new Zend_Form_Element_Text(‘fullname’); $name->setLabel(‘Full name:’); $name->setDescription(‘Find customer’);

Read more

sfMemcachePlugin limitations

I’m using quite hapilly sfMemcachePlugin, but recently i needed to store object which was around 2Mb, and problems started. I’ve spend couple minutes trying to figure out why app is not working, finally i Found that memcache doesn’t store stuff more than 1Mb. To solve that, I’ve

Read more

Online CSS and JS compressor – save your visitor time

Today I needed to reduce size of CSS and JS which was almost 400Kb all together. Spending some time found usefull tools for it. http://iceyboard.no-ip.org/projects/css_compressor and http://dojotoolkit.org/docs/shrinksafe are winners Before compressing javascript file make sure that You don’t have anything compressed already there, all lines are ending with

Read more
Page 5 of 512345

Latest Posts

On twitter...

Posting tweet...

Powered by Twitter Tools