Needed a quick and easy way to create a bit.ly URL for another site of mine. Google came through for me. David Walsh posted a…
Needed a quick and easy way to create a bit.ly URL for another site of mine. Google came through for me. David Walsh posted a…
Working on web apps I find myself using the print_r command a lot, and I mean a lot. It helps trace out what data is…
This is a short PHP script that I use on my DailyFont.com site to handle downloads. Sure it’s easy to just link to the zip,…
I’ve got a web client having some really odd problems with a program of mine logging him out randomly. Normally I upload a phpinfo file and use that to see if I could find out anything but when I did that I got an error that phpinfo had been disabled for “security purposes”.
PHP is one of the dominant web languages in use today. If you do any web design work you probably have at least a passing knowledge of PHP. Heck, even if you don’t do any web design you’ve probably noticed web pages ending in .php.
But here are 5 things you may not have known about PHP. If you’ve been working in PHP for a while you probably already know all these, but they’re still there to look at.
I needed a way to find the first second of a week and the last second of a week based on a Unix timestamp.
Real quick little function to get a random number using PHP. The variable $x will contain a random number between 1 and 100. It’s rand(min,…
This function returns ‘win’ if running on a Windows server and ‘linux’ if not running on a Windows server. It should be pretty easy to extend it to match other server operating systems, but this is all I needed.
The following function will return TRUE if the server is running PHP in safe mode. It uses the function ini_get, which may be disabled. If ini_get is disabled then the function also returns TRUE since the assumption that any server disabling functions would probably also be running in safe mode.
Knowing what version of ImageMagick is usually important if you’re going to be shelling to it to perform tasks. For me it was the –sepia-tone option that was added in either 6.2.1 or 6.2.2. Prior to that, using that option caused the conversion to fail.
The following function will return the numeric version of ImageMagick you have installed.
Can't find what you're looking for? Try refining your search: