Skip to Content

Free TUAW iPhone app -- try it now!
AOL Tech

PHP posts

Filed under: Utilities, E-mail, Web services

Backup2Mail: automatically back up your site's database to email


It's a good idea to back up your website's databases periodically, in case of unforeseen server catastrophes, but it can be hard to remember to do it manually. One automated backup process you might consider is Backup2Mail, which sends backups of your MySQL databases to an email address on a schedule you specify using cron jobs. As long as you can run PHP apps, you're set to go.

A lot of free email accounts - I'm thinking of Gmail, here, specifically - offer enough storage space to keep from filling up too quickly with backups. If you're a privacy-conscious person, you could have Backup2Mail back up to an account on your own server. If you were really ambitious, you could probably set up a simple script or filter for the email account to have it clear out the oldest backups to make room for me.


Filed under: Internet, Productivity, Web

Fever offers a hot new approach to reading feeds


Fever is a new feed reader that calculates the "temperature" of your feeds by asking you to group them into essential and occasional categories, and looking at how they relate to one another to create a "hot" category. It's like your own personalized, automated Digg. It's the brainchild of Shaun Inman, one of the most respected designers around, and the UI looks great and seems intuitive.

Here's the catch, though: Fever's not a desktop app. It's a PHP/MySQL app that you host on your own server. This offers several advantages: you can access it from anywhere, you can filter ads by blacklisting advertising domains, it updates itself automatically, and you can use cron to make your feeds automatically refresh whenever you choose. Fever is powerful, but I'm sure some people are going to balk at installing it, despite the very nice video walkthrough on the site.

If you don't mind running Fever on your server, but you're the kind of person who really needs an icon in the dock, you can run Fever on the desktop using Fluid, which turns web apps into standalone browsers. Fever also has a very, very nicely-done iPhone-optimized design, so if you're checking your feeds from an iPhone, you're in for a treat (without having to download an iPhone app, even).

Filed under: Developer, Internet, Features, Linux, Open Source, How-Tos

Flipping the Linux switch: Linux web tools, Pt. 2 - Using LAMP for testing

small apache2 install graphicThere was a toss up this week about whether it would be better to dig right in to the Linux HTML editors, or to wax poetic about setting up LAMP so that those choosing to go the content management system (CMS) route could test any changes they made with such editors on their local machines.

We ultimately decided to tackle setting up a LAMP testing ground. This will certainly not be necessary for every single person out there who just wants to put up a web site. If your site is not using PHP-driven content that interacts with or requires a database backend, and you just plan on designing static web pages, there is absolutely no need to do any of this.

If you are perfectly content to upload your site and integrate any supporting elements (once again, things like databases) live and on the web and make changes there, where it is possible that everyone can see your style sheet testing or things may be temporarily broken, you don't need to do this either.

Some people, though, really like to get things on their CMS tweaked to near perfection before releasing their content on the world. Other people need to know exactly what a dynamic site is going to look and act like before it goes live. The combination of Linux, Apache, MySQL and PHP (LAMP) makes this possible.

Read more →

Filed under: Audio, Business, Internet, P2P

RIAA website gets hacked by SQL injection

RIAA site hacked
Yesterday a Reddit user posted a link that supposedly runs a time-consuming SQL query on the RIAA'a website. Of course the Reddit community began trying to stick it to the RIAA, and eventually someone may have deleted all of the site's content by exploiting a poorly configured web/database server with an SQL injection attack.

The site appears to be operating fine now, but we noticed it certainly wasn't fine yesterday (and TorrentFreak has screenshots of the site, sans content). Is it ironic that the RIAA uses free open-source software (OSS) such as PHP to run their website while hunting down people who allegedly don't pay for music? You'd expect something more sinister, like Karl Rove hand typing HTML pages in a dimly lit sarcophagus or, at least MS SQL/IIS.

If only they spent more time working to save themselves from cross-site scripting attacks and SQL injection instead of going after college students for downloading "My Humps."

[Via TorrentFreak]

Filed under: Internet, Productivity

Optimize Mint web stats for both desktop browsers and your iPhone



Mint is a powerful, extensible web statistics package from Shaun Inman, web designer extraordinaire. With a wide array of plug-ins that can even incorporate stats from other services like FeedBurner, Mint is a one stop, self-installable shop for virtually any and all stats you will ever have to view for your site. In fact, one of Mint's strengths is that it can be customized to scale down gracefully to a one-column view for users who prefer the option to view their stats on mobile devices. Even after getting an internet-rich iPhone, however, Richard Herrara doesn't want to have to chose between the default two-column view or the device-optimized view - so what's a web hacker to do? Why, hack one of Mint's files to auto-detect the iPhone browser and only display the one-column view for that particular device, of course! Head over to Herrara's site for the instructions on two simple edits you must make to Mint's head.php file, as well as a custom iPhone stylesheet to upload for some dual-mode desktop/iPhone Mint-y goodness.

[via Peppermint Tea]

Filed under: Developer, Internet, Utilities, Freeware

WAMP5 and EasyPHP, both great local web server options

WAMP5EasyPHP is a great little web server package, as you might expect, it has the usual LAMP (Linux, Apache, MySQL, and PHP) stack, with phpMyAdmin, and a few other things. The only issue you might have with the EasyPHP 1.8 release is that it uses PHP 4. This may not be a problem unless you really need some of those sweet new features from PHP5. No word yet on when the folks at EasyPHP will be including PHP5, but we hope it will be soon. The more web development you do in PHP, you start to want those new features more and more. If you need a PHP4 based web server for testing or other purposes, EasyPHP is great.

If you just can't get enough of that PHP5 goodness though, you're out of luck, especially for someone who doesn't want to go inserting PHP5 into EasyPHP and bringing the whole shebang down on their heads. There is a web server solution that includes PHP5 in a slim package that is seamless and you could almost say exciting. WAMP5 installs quick and does a kill job of it. It more accurately reflects the fact that this is Windows not Linux we're using, thus the WAMP name. A great part of WAMP is the built in service support and simplified administration panel.

The downside to WAMP is that it is only a desktop installed application, not playing nice with your portable web-serving needs. While not a real drawback, it can be useful to have a portable web server running on a stick for a web developer on the go. EasyPHP does work well on a portable drive, so long as you can live without PHP5 for a bit. For most things either web server package will work just fine. They both are small downloads, easy to install and run without a hitch, and make your life easier. Both packages are also free, which helps with sticker shock.

Remember the days when you had to change each file one by one on FTP and re-upload? Yeah, those days are over.

Filed under: Design, Developer, Macintosh, Commercial

Panic brings Coda to the web development world


Panic, the fine folks that bring us Transmit, finally revealed the top secret app they've been developing over the past year with the release of the web development application Coda V1.0. This is not a WYSIWYG, drag-and-drop, do-all application. Coda has a specific target audience that consists of people who edit raw code using multiple tools such as a text editor, FTP client, CSS editor and Terminal.

Coda brings all these tools together in one neat interface. You can organize your files using Sites, edit with the text editor, utilize the built in preview functionality, style your pages with the CSS builder and even access Terminal with one click for those times you need to do a little MySQL or other Terminal task. You can make your changes locally then publish to the web, or edit the files directly on the server using the built in Transmit FTP engine. And as an added bonus, for those times you are stuck trying to remember syntax or learning something new, it also includes access to HTML, CSS, Javascript and PHP reference books from within the interface.

After using Coda for a couple weeks it amazes me that this is just a version 1.0 release. Panic has released a 1.0.1 update, but it's hard for me to find anything to complain about. If you are a hand coder, you should definitely check out the 14 day free trial. Coda will retail for $99, but for a limited time it's available for $79. If you are a current owner of Transmit 3, knock another ten bucks off and it can be yours for $69. Sorry Windows users, Coda only runs on Mac OSX 10.4 and higher.

Filed under: Developer, Internet, Blogging, Productivity

Get your Mint stats via Growl


We're big fans of web stats packages, and Shaun Inman's powerful and flexible Mint is definitely near the top of our list. While Mint and its various plugins can watch all manner of web stats and there are even widgets to check some stats from the comforts of your desktop, Tyler Hall decided to go one step further and has built a pepper (i.e. - a plugin for Mint) simply titled php-Growl that can send some Mint statistics to Growl, the Mac OS X system notification utility. While it can take some configuring (the comments at the Peppermint Tea post where we found this offer a good overview), this sounds like a handy way to keep an eye on stats without having to furiously refresh your Mint page or run yet another Dashboard widget.

php-Growl is being hosted at Google Code and is distributed under the MIT License.

Filed under: Internet, Blogging, Mods

Twitter hack: Site RSS to Twitter

TwitterWith the craziness continuing to skyrocket, Twitter is getting more and more popular as the days go on. One terrific addition that can be added to this craze is something called microblogging, where you give your twitter account a short update about what was just posted to your blog, and Paul Stamatiou has managed to find a way to make this cake for anyone.

With the 2 PHP scripts available at Paul's site, all you need to do is find a good RSS feed URL, a web host that has PHP and curl support and you're all set. After tinkering with various websites it was found that using Yahoo Pipes to create that RSS feed URL will work more often than just grabbing the RSS feed URL from the site you want to microblog about. Your results will be an update to your personal twitter account that contains the full title of the site's post and then a tinyurl that links to that post. Just a little something more to help spread the word about either blogs you are interested in or your own personal blog.

Filed under: Design, Developer, Open Source

Using gzip to optimize your CSS for speed

photo by klynslisThere are all sorts of tricks that web developers have for decreasing page load times and optimizing their content, here's another quick and easy one using gzip and PHP. If your web server's PHP installation supports zlib (most do), you could squeeze a few KB worth of precious seconds out of this trick. Paul Stamatiou, the author of this handy tip, gives an example of Digg's stylesheet, which weighs in at 26.3kB, and after compression comes out at a featherweight 6KB. Not a bad savings in exchange for a few minutes of your time, if you are so inclined.

(Thanks, Paul!)

Filed under: Internet, Web services, Freeware, Social Software

Take your stikkits with you

Yea, I know you're already bringing your stikkits with you on your notebook, but I'm talking about putting them in your pocket using that 'paper' stuff.

Aaron Straup Cope has whipped together two PHP files that can query Stikkit (which we're growing fond of) and create a printable, foldable and ultimately pocket-able version of all your stikkits. In a detailed post describing his thought process, Aaron links the necessary files with a description of what exactly is going on. When all is said and done,

To me, this sounds nice and all, but I think I'll wait for the iStikkit desktop application before I start whipping out my PHP chops.

Filed under: Internet, Web services, Social Software

YShout: a PHP + AJAX Shoutbox

YShout - a PHP and AJAX ShoutboxI have always wanted to see shoutboxes make their way farther across the internets. Hopefully YShout, and other systems like it, can help blaze the trail. YShout is a slim, powerful and standards-compliant shoutbox built on PHP and AJAX. Stylable through the beauty of CSS, installation and customization sound like a breeze. The feature list is also pretty extensive, though only the big new features in this latest v4 release are spotlighted on the product page, such as message deletion, BBcode support, auto-banning flooders and even a customizable word censor. Of course, a test shoutbox is also provided to help you get your feet wet.

To obtain a copy of YShout, Yuri Vishnevsky (the developer) has implemented what I think is a great donationware system: you have to donate something, anything, to snag a download. Before doing that, however, be sure to check out YShout's page for more details to see if YShout is the shoutbox for you.

Filed under: Developer, Internet, Text, Windows, Macintosh, Linux, Productivity, Open Source

Zend and Google mashup in PHP

ZendThe Zend PHP framework will now play nice with Google Data in a collaborative effort that puts the elves to shame. The component built by Google and Zend lives in the top level and not under Zend_service, which makes it more accessible and is mostly because the Gdata service is a protocol of its own, not merely a service wrapper. Google's component isn't the first to be included and follows the likes of Amazon, Yahoo, Flickr, and others to allow PHP developers to use data much easier through the Zend framework.

The new version of the Zend framework is out (version 0.60) as of last week, so go check it out when you get done going through your stocking one more time. The new framework has many bug fixes and features as you might expect, but that is why you can download it and have fun yourself.

Filed under: Developer, Internet, Text, News, Productivity, Web services, Open Source

PHP 5.2 released

PHPI don't have to tell you what PHP is obviously, many of you could run circles around me. I don't have to tell you how widely used, versatile, or powerful it is either. All I need to tell you is that 5.2 is out. This release is mostly bug fixes, some new enhancements, just in case you were wondering or hadn't heard yet. PHP is my favorite web scripting language, and I jump all over it when new versions of my favorite software comes out. Via the PHP.net website, these are the new features of PHP 5.2.0:
  • New memory manager for the Zend Engine with improved performance and a more accurate memory usage tracking.
  • Input filtering extension was added and enabled by default.
  • JSON extension was added and enabled by default.
  • ZIP extension for creating and editing zip files was introduced.
  • Hooks for tracking file upload progress were introduced.
  • Introduced E_RECOVERABLE_ERROR error mode.
  • Introduced DateTime and DateTimeZone objects with methods to manipulate date/time information.
  • Upgraded bundled SQLite, PCRE libraries.
  • Upgraded OpenSSL, MySQL and PostgreSQL client libraries for Windows installations.
  • Many performance improvements.
  • Over 200 bug fixes.
And this is the list of security features:
  • Made PostgreSQL escaping functions in PostgreSQL and PDO extension keep track of character set encoding whenever possible.
  • Added allow_url_include, set to Off by default to disallow use of URLs for include and require.
  • Disable realpath cache when open_basedir and safe_mode are being used.
  • Improved safe_mode enforcement for error_log() function.
  • Fixed a possible buffer overflow in the underlying code responsible for htmlspecialchars() and htmlentities() functions.
  • Added missing safe_mode and open_basedir checks for the cURL extension.
  • Fixed overflow is str_repeat() & wordwrap() functions on 64bit machines.
  • Fixed handling of long paths inside the tempnam() function.
  • Fixed safe_mode/open_basedir checks for session.save_path, allowing them to account for extra parameters.
  • Fixed ini setting overload in the ini_restore() function.
So, apparently the PHP guys have been busy bees, and they are doing it all for the good of the common developer like you and me. It brings a tear to my eye...okay not really.

Filed under: Developer, Windows, Microsoft, Open Source

Microsoft and Zend announce PHP collaboration

PHPToday Microsoft and Zend Technologies--the corporate face of ultra-popular web programming language PHP--announced a "technical collaboration to enhance the experience of running [PHP] on Windows Server 2003." The collaboration will entail technical improvements to Windows Server which will be released under the open source PHP license, Microsoft releasing a FastCGI component for IIS, Zend establishing a Windows testing lab "to maintain high performance of PHP on the Windows Server platform as PHP evolves," and active participation in the PHP community "ensuring open discussion to help developers planning to deploy PHP applications on the Windows Server platform."

This move is mutually beneficial to both companies. Microsoft wins by wooing PHP developers--traditionally an open source lot--to their platform and stemming migration to LAMP with promises of improved performance, and Zend wins by getting in good with Microsoft's own large and loyal circle of developers. "Since our preliminary work with Microsoft, we have already seen a better than 100 percent performance gain with some PHP applications on Windows Server 2003," says Andi Gutmans, Zend co-founder and CTO. He also claims that "a majority of PHP developers [are] developing on the Windows platform," though he does not make the distinction between developing on Windows and deploying on it.

Featured Time Waster

Graveyard Shift - zombie-busting Time Waster

With Halloween fast approaching, it's a great time to get in some practice defending your territory against zombies. In Graveyard Shift, you take aim at zombies and other creepy-crawlies, blasting them into splatters of cartoony green guts. It's a casual first-person shooter, and it's very easy to get the hang of - use the mouse to aim, click to fire. Graveyard Shift has at least 15 levels, and it might even have some secret stages I haven't unlocked yet. They key to getting good at Graveyard Shift is learning to use ...

View more Time Wasters

Featured Galleries

Defective by Design, London: Protest Pictures
Microsoft Security Essentials
Chromium Pre-Alpha on CrunchBang Linux
Safari 4 Beta
10 Firefox themes that don't suck
IE8 RC1
Download Squad at the Crunchies After-Party
Download Squad at the Crunchies
WordPress 2.7
Cooking Mama: Mama Kills Animals
Windows 7 Hands On
Comodo Internet Security
Android First-look: Amazon.com MP3 Store
Android First-look: Twitroid
Google Reader Android
Android Hands-On
Twine 1.0
Photoshop Express Beta
Mozilla Birthday Cake
Palm stuff
Adobe Lightroom 1.1

 


Follow us on Twitter!

Flickr Pool

www.flickr.com

More Tech Coverage

AOL Radio