PHP Tutorials
61. Encrypting files using GnuPG (GPG) via PHP
By: Darrell Brogdon : 2011-01-24
Description: Quite often your PHP scripts are written to run automatically within the web server without any intervention by you. What kind of life can you expect to lead if you have to enter your GnuPG passphrase every time PHP tries to decrypt a file? But we're getting a little ahead of ourselves. Let's first look at how we can encrypt a file with GnuPG and PHP
62. A Tutorial on Timezones and Timestamps
By: Ben : 2010-09-29
Description: In the POSIX standard, "unix time" does not have a specified timezone. It is universal. For most intents and purposes you can think of them as always being GMT/UTC. (And you can derive the UTC time from a "timestamp" by dividing it by 86400 and looking at the modulus.) Do not ever try to adjust a timestamp by a timezone offset (specifically, do not ever use the code at the end of Glen's note). Timezones are basically used only when "rendering" a timestamp from "unix time" into a "civil time" date/time string.
63. Get the time past between two MySQL dates in PHP
By: Ashley Hunt : 2010-09-29
Description: I wanted to get the time past from two MySQL dates and came up with this code that does the trick. Supply a start date, end date and optional output date/time format the default is in seconds but will expand from SS to MM:SS and then to HH:MM:SS automatically, you may wish to force a date format that will not be dynamic (site layout etc). See examples below, also see function date() for more date format options.
64. Generate random timestamp between two dates
By: Sir Derek G : 2010-09-29
Description: Here's a nifty little function that returns a random timestamp between two dates.
65. Building a Video Sharing Site using PHP in AWS
By: Clay Loveless, Chief Architect, Mashery : 2010-07-03
Description: There's a blog post out there that gives a brief rundown on building a video sharing site. The post gives a quick overview of what's necessary, and even provides sample code for some of the steps. Obviously you can build something simple for your home movies, or something as complex as YouTube. Yes, you really could build something like the next YouTube on top of Amazon Web Services. All you'd need to do is:
66. XMLRPC for PHP - A simple client and server program
By: Emiley J : 2010-06-30
Description: Here is an example of using xmlrpc for PHP with a complete client and a server php files. You can use this to test your xml-rpc for php installations.
67. How to fix: Warning: Visiting this site may harm your computer - domainameat.cc
By: William Alexander : 2010-06-29
Description: The website at www.yoursite.com contains elements from the site domainameat.cc, which appears to host malware – software that can hurt your computer or otherwise operate without your consent. Just visiting a site that contains malware can infect your computer.
68. PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug ......
By: Emiley J. : 2009-06-13
Description: If your PHP files suddenly stop working for no apparant reason and you just get a blank page for all your PHP files then the first thing you will do is to check your error_log. And if you have repeating lines in your error log such as "PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug " then you can solve it.
69. Using Text file as database in PHP
By: David Sklar and Adam Trachtenberg : 2009-02-24
Description: Storing your data in a text file doesn't require any additional database software to be installed, but that's pretty much its only advantage. Its main disadvantages are clumsiness and inefficiency. At the beginning of a request, you've got to lock your text file and haul out all your data from it, even if you're only using a little bit of the data. Until you unlock the file at the end of the request, all other processes have to wait around, doing nothing, which means all your users are waiting too. One of the great assets of databases is that they give you structured access to your data, so you only lock (and load into memory) the data you actually care about. The text file solution doesn't do that.
70. Parent: child process exited with status 3221225477 -- Restarting
By: Emiley J. : 2009-02-07
Description: If you are getting this error, you are probably trying to use Apache, MySQL and PHP in a windows system. Just do this simple step to solve this issue