This command line option will strip all comments and white space.
php –w input.php > output.php
php –w input.php > output.php
function isAjax()
{
return (isset($_SERVER['HTTP_X_REQUESTED_WITH'])
&& ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')); }
if ($result = mysql_query("SHOW COLUMNS FROM {$table} LIKE '{$column}'))
{
$enum = mysql_fetch_object($result);
preg_match_all("/'([\w ]*)'/", $enum->Type, $values);
}
Cron jobs are hidden building blocks for most of the websites. They are generally used to process/aggregate data in the background. However as a website starts to grow and there is gigabytes of data to be processed by every cron job, chances are that our cron jobs might overlap and possibly corrupt our data. In this blog post, I will demonstrate how can we avoid such overlaps by using simple locking techniques. I will also discuss a few edge cases we need to consider while using locks to avoid overlap.http://abhinavsingh.com/blog/2009/12/how-to-use-locks-in-php-cron-jobs-to-avoid-cron-overlaps/
Picasa Web Albums offers Web application developers a REST-based Data API to manipulate the photos and albums stored on its servers. PHP's SimpleXML extension and Zend's GData Library are ideal to process the XML feeds generated by this API so you can customize PHP photo management and photo sharing applications. In this article, meet the Picasa Web Albums Data API and see how you can use it to retrieve photos and photo metadata; add, modify and delete photos; and perform keyword searches of Picasa's user-generated content.http://www.ibm.com/developerworks/library/x-picasalbum/
Google Base allows users to store any type of content online in Google's version of a massive online database. Web application developers are able to access and search this content through the Google Base Data API. This article introduces the Google Base Data API and demonstrates it in the context of a PHP application, explaining how to use SimpleXML and the Zend_Gdata module to search, retrieve, add, and edit different types of data on Google Base.http://www.ibm.com/developerworks/library/x-gbase/