php

MySQL Database Diff Script

Simple PHP script for MySQL database structure diff

PHP - __autoload Hints

Quickstart to PHP Screen Scraping

With the increased use of RSS, screen scraping is becoming less necessary. However, there's still plenty of times that it can get you out of a bind, at least temporarily. I think it's easiest to do screen scraping with PHP and the curl extension (a typical PHP configuration). This shows how I screen scraped the Michigan Lottery website to retrieve the Keno results I used in the article Michigan Keno Stats Over 16 Years.

Reload httpd via PHP (sorta)

The problem:
Apache forked processes (PHP, CGI, etc) runs as a different user (usually www or some variant) which doesn't have permission to restart Apache. To further compound the problem, PHP doesn't allow you to sudo to a user that does have the privileges (they call this a "security feature"). Also, if it did have the privileges, it cannot reload httpd directly because that's it's parent process.

Syndicate content