Popular This Week
- Difference in Hub, Switch, Bridge, & Router
- Multiple cases for switch construct
- Plugins for inserting JS and CSS into posts
- PHP: A function to return the first n words from a string
- PHP: Benchmarking echo vs. print vs. printf
- DIY: Make Your Own Ethernet Loopback Cable
- How to create a wine glass in Blender
- How to get a screen shot from an iPhone
- How to revive a dead Western Digital MyBook
Monthly Archives: July 2006
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, max) if you don’t want to use 1 and 100 as your limits.
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 … Continue reading
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 … Continue reading
Wanting to keep pages out of the SERPS that I felt shouldn’t be there I started using the following robots.txt file on a SimpleMachines forum site of mine.
On my first WordPress site I went and added all of the files I didn’t want search engines indexing to my robots.txt file thinking that it was necessary to keep them out of the SERPS. But WordPress makes it easier … Continue reading
You know, I’ve pretty well accepted that I’m going to have email spam get through to my inbox. Even with Thunderbird’s spam filtering, it still gets through. But today I got a spam message from an SEO company called The … Continue reading
One of the fears of AdSense users is that they will accidentally click on an ad on their own site and get banned by Google. I’ve always assumed that these fears are a little over-hyped. I just can’t see one … Continue reading
One of the functions added in PHP 5 is file_get_contents. This function allows you to just pass a file name and it will return the entire contents of the file. That’s all well and good if you’re using PHP5, but … Continue reading