Skip to main content

comp.lang.php FAQ

It's really fascinating to contribute to the FAQ compilation in c.l.php. Once I wanted and compiled few questions and answers, but lost some stuff in poor CD — even I intentionally deleted, as I wasn't convinced about the quality.

The recent compilation work kicked off by John Dunlop and Chung Leong is really evolving. My contribution is now trivial and wishes to contribute more questions—but badly need someone to correct my sluggish English:-( By contributing some questions, I've benefited by readers' feedbacks.

Progress/status bar for file uploading

I'd thought implementing pure PHP progress bar for file uploading (without patch hack or Perl hack) is impossible. But, Chung Leong proved that PHP CLI can be used for the progress bar and hence the pure PHP progress bar is achievable. This is really cool.

Links

Comments

Popular posts from this blog

NETELLER - Privacy and security design flaw

Yesterday, colleague of mine brought to my notice about a payment system called NETELLER and it's merchant API named NETELLER Direct API V4 . This NETELLER Direct API V4, helps the merchant to collect amount from users. It's simple--same just like early Authorize.net , along with the required amount you collect the user's id and password and post them to their API URL and they'll send you back with success or error codes in XML format. The major problem with these types of system is security and privacy --you lose both as you're forced to type your username and password in alien web page. If I remember right, this is was the case with Authorize.net and they changed their design to something like PayPal . The PayPal design is somewhat better as you never type or forced to type your username and password in other alien web pages. The alien merchant web page uses NETELLER Direct API V4 is forced to get user's NETELLER account and password. I'm much s...

Converting PSD with PHP/ImageMagick

After seeing feature rich options in Imagick PECL extension at Mikko Koppanen 's (the author) website and also impressed with ImageMagick 's features, I have decided to use it for the PSD to XHTML conversion website that I'm architecting and managing. Since, the team wants programming help for converting PSD images, I have tried it (documentation is sparse on PSD handling) Converting PSD to PNG/JPEG/etc Note that, flattenImages() is needed for layered/multi-page PSD file. <?php $im = new Imagick('test.psd'); $im->flattenImages(); $im->setImageFormat('png'); $im->writeImage('test.png'); ?> Extracting PSD layers One by one <?php $im = new Imagick('test.psd'); $im->setImageFormat('png'); for ($i = 0, $num_layers = $im->getNumberImages(); $i $im->setImageIndex($i); $im->writeImage('layer' . $i . '.png'); } ?> Note that, there is a better version below In a single call with writeIm...

Stampede and the "Dirty" "Dark" Crowd

Actor Ajith Kumar’s recent interview has sparked quite a few conversations on social media. The part that caught my attention, was his take on crowds. About 30 years ago, when I first joined a college in Madurai after growing up in other places, I experienced a few cultural shocks. Perhaps these weren’t unique to Madurai, but that’s where I first noticed them. One major thing that stood out was the behavior of crowds. For instance, if you suddenly see people rushing to board a bus, chances are there’s a pickpocket in action. During one of Madurai's annual festivals, I noticed some young men carrying water bags — not to distribute water, but to spill it on women, often on their chests. Shockingly, this was almost normalized; parents would quietly tolerate it to avoid public embarrassment, walking a little farther behind the crowd. When some women happened to witness this, they would just shoo the boys away instead of confronting them. The crowd, in such cases, became a kind of...