Tutorials Page 230
PHP Randoms – Random Functions To Do Random Numbers, Random Strings, Random Files, & More
Random values are important to a lot of larger websites. Randoms can be used to generate strings for passwords, quotes, and CAPTCHAs. They can also be used for grabbing random numbers for games and other purposes. Here are a few random functions to...
GoDaddy Hosting Tip – Using CURL On GoDaddy Shared Hosting
I want to throw a quick tip out there to anyone that plans to use cURL on GoDaddy hosting servers. I've been developing a shopping cart and ported the site from my development server to the hosting server. I ran into a huge problem...
Block Access to Include Files Using .htaccess
When I build websites for clients and myself, I use numerous include files to make my website easy to maintain. These include files may:be composed of pure HTML; no server-side programming involvedbe PHP class files; used throughout the websitecomposed of both HTML and PHPPHP code...
Free SitePoint Ruby on Rails Book!
I'm a big fan of SitePoint. I'm not a fan of Ruby on Rails, mostly because of the pathetic Rails Envy mock commercials, but I'm a huge fan of expanding one's knowledge.For a limited time, SitePoint is offering a FULL book, Build Your Own Ruby...
WordPress’ .htaccess File Is Genius
Choosing to use WordPress was a more difficult decision that you may think. Sure, WordPress is the most used blogging software on the internet, but I'm a programmer, right? I should want to code everything myself, right? I thought that at first but...
Prevent Image Hotlinking With .htaccess and mod_rewrite
One way to kill your website's bandwidth and overall download speed is to not block image "hotlinking." What's hotlinking? Hotlinking is linking to a file on an external server that the Web Developer does not own (most of the time the Web Developer doesn't...
Suppressing PHP Errors & Warnings Using @
One part of making sure your website is secure in its hosting environment is to handle errors in a good fashion. If you don't have complete control of your hosting environment, you don't know what you can expect in the way of error handling if...
PHP Cookies: How to Set Cookies & Get Cookies
Cookies don't have to be an essential part of a website but can provide some of the "little things" that can set your website apart from the rest. Cookies are small tidbits of information that you save on the client's computer so that you can...
Set Your Site’s Date/Time Settings On Shared Hosting Using PHP5’s date_default_timezone_set()
One annoyance with putting my customer's site on shared hosting is not being able to control the date and time on the hosting server. Sure, I could simply host with a local company but that's not always the most cost-effective option.I use a new function...
PHP’s Magic Constants: __LINE__ , __FILE__, __FUNCTION__, __CLASS__, and __METHOD__
Setting constants in PHP is as easy as using the define function, but PHP creates a few constants in every script for you that help mostly for debugging purposes (well, that's generally the only time I use them). These constants are called "magic constants."Magic constants...