RSS ? Recent Blog Posts

Blogs » PHP
 

Dynamically Typed

: PHP Blog

Ready for PHP & MySQL Week at SitePoint?

by Andrew Tetlaw

To celebrate the release of the new edition of well-loved SitePoint book “Build Your Own Database Driven Web Site Using PHP & MySQL, 4th Edition” — by Kevin Yank, we’re publishing a chapter a day next week, beginning Tuesday the 7th of July. Check out what you’ll be reading.

 

Learn PHP The Easy Way

by Shayne Tilley

With over 40,000 copies sold of the three previous editions, I’m very pleased to announce the latest title hot off the SitePoint production line, Build Your Own Database Driven Web Site Using PHP & MySQL, 4th Edition, by Kevin Yank.

 

Get a Free iPhone: Help SitePoint Recruit a PHP Developer

by Kevin Yank

SitePoint is looking for two experienced PHP developers (one with a sysadmin twist) to join the team here at SitePoint HQ in Melbourne, Australia. Help us find the right person for either of these positions, and we’ll buy you a shiny, new iPhone 3GS!

 

A Note on Google’s So-called Best Practices

by Troels Knak-Nielsen

The advice for PHP developers in Google’s recent “make the web faster” campaign are plain wrong. Troels tackles some of the tips and provides some words of wisdom on how to really optimise your site’s performance.

 

16 PHP Frameworks To Consider For Your Next Project

by Sean P Aune

Why spend valuable time coding everything by hand? Using a PHP framework is a great way to save time and effort on your next project. Sean highlights 16 frameworks for you to choose from.

 

Introducing Bucket: A Minimal Dependency Injection Container for PHP

by Troels Knak-Nielsen

Troels got fed up with the lack of a decent Dependency Injection container for PHP, so he did what any diligent programmer would do … he built his own. Check out Bucket, released today as an open source package.

 

Interactive CLI password prompt in PHP

by Troels Knak-Nielsen

Just a quick tip, since I spent a good hour figuring this out recently. PHP has no native way of doing an interactive password prompt, when running as CLI. You can however use bash for the task. Of course this means that it won’t work on Windows, but you should be fine on most anything else. Edit: Using Windows Scripting Host, it’s possible to pop a prompt up for the user to type in. I’ve extended the example to use this technique for Windows based systems.

/**
* Interactively prompts for input without echoing to the terminal.
* Requires a bash shell or Windows and won’t work with
* safe_mode settings (Uses `shell_exec`)
*/
function prompt_silent($prompt = “Enter Password:”) {
if (preg_match(’/^win/i’, PHP_OS)) {
$vbscript = sys_get_temp_dir() . ‘prompt_password.vbs’;
file_put_contents(
$vbscript, ‘wscript.echo(InputBox(”‘
. addslashes($prompt)
. ‘”, “”, “password here”))’);
$command = “cscript //nologo ” . escapeshellarg($vbscript);
$password = rtrim(shell_exec($command));
unlink($vbscript);
return $password;
} else {
$command = “/usr/bin/env bash -c ‘echo OK’”;

 

Free PHP Webinar: How to Increase Performance with Caching

by Craig Buckler

Zend are running a free webinar today, with a live demonstration showing how to improve the performance of your PHP applications using Zend Server caching.

 

How to Install PHP on Windows

by Craig Buckler

In his final installation tutorial, Craig provides a step-by-step guide to installing PHP5 as an Apache module in your Windows development environment.

 

Build a Buzzword Bingo Card in PHP

by Raena Jackson Armitage

Bored in meetings? Worry no longer. Raena demonstrates how to ease the pain of meetings by creating your own buzzword bingo game using a scrap of beginner PHP.

 

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow us on Twitter