B&T's Tips & Scripts
B&T's Tips & Scripts is a collection of Tips & Scripts to help you build a better website. The Tips & Scripts are targeted towards the native Apache PHP MySQL environment. Check back frequently as there will be additions and modifications. Please read our terms of use and our frequently asked questions. And while you are here, check out B&T's Tool Box.
Using .htaccess
  1. .htaccess Basics
  2. Domain & subdomain pointing
  3. Automatic subdomains
  4. Undefined subdomains
  5. Prevent direct access to a pointer or subdomain directory
  6. Forcing or eliminating the WWW.
  7. Fixing the trailing slash problem
  8. Friendly URLs
  9. Rewrites and https
  10. Blocking traffic to your website
  11. Anti-leech
  12. Fancy default index page
Coding Tips
  1. HTML "One Liners"
  2. PHP "One Liners" PHP
  3. JavaScript "One Liners" JavaScript
  4. CSS examples
  5. SQL coding examples PHP
  6. MySQL Error Handling PHP
  7. AJAX example JavaScrip PHP
  8. Regular Expression Rules
Using .htaccess/.htpasswd Password Protection
  1. Setting up password protection
  2. Encrypt your password for .htpasswd PHP
  3. Auto Password Change and Email Notification PHP
  4. Auto generate .htpasswd file PHP
  5. Passing user authentication information to PHP PHP
Uploads and Downloads
  1. File Upload Script PHP
  2. Custom Download Page PHP
  3. Tracking and Securing Downloads PHP
Mail
  1. Form Mail PHP
  2. Obfuscate your email address JavaScript
  3. Read and auto-process mail PHP
  4. Auto-responder PHP
  5. Display your email message count PHP
  6. Setting up SPF Records
  7. Specify a return-path for generated mail PHP
Using PHP
  1. Creating a custom php.ini file PHP
  2. Copying the php.ini file PHP
  3. Deleting php.ini files PHP
  4. Clean up your PHP scripts PHP
  5. Deleting session files PHP
Frequently Requested Website Functionality
  1. Visitor Counter PHP
  2. 404 Error Page (with logging) PHP
  3. 404 Error Image (with logging) PHP
  4. HTML5 Audio (flash fall-back) JavaScript
  5. CAPTCHA PHP
  6. Poll (voting) PHP
  7. Weather PHP
  8. FAQ Page JavaScript
  9. Time Until JavaScript
  10. Simple "members only" pages PHP
  11. Replace banned words PHP
  12. Get the most recent file date PHP
  13. Sticky default values for an input JavaScript
  14. Topic Rating JavaScript
Working with Images
  1. Watermark images PHP
  2. Resize images (create thumbnails) PHP
  3. Random/weighted banners (images), quotes & more PHP
  4. Multiple random banners (images) PHP
  5. Load a random image (JavaScript) JavaScript
  6. Load a random image (PHP) PHP
  7. Image (banner) rotation JavaScript
  8. Moving (bouncing) Image JavaScript
  9. Make every image pop up JavaScript
  10. Photo Album JavaScript PHP
Website Managment
  1. Tips for keeping your website secure
  2. Using Cron
  3. Website Monitoring PHP
  4. Automated Site Backups PHP
  5. Automated MySQL Backups PHP
  6. Find File and Directory Sizes PHP
  7. Search and Replace PHP
  8. Validate Webpages JavaScript
Other Tips
  1. URL Validation PHP
  2. Stop direct links to web pages PHP
  3. Ensure your page is not opened in a frame JavaScript
  4. Masking your URL in the Address Bar JavaScript
  5. Ban or allow IP Addresses (without using .htaccess) PHP
  6. Using Cookies PHP
  7. View your website in different resolutions JavaScript
Helpful Links to Other Sites
  1. PHP Documentation
  2. Apache Server Documentation
  3. MySQL Reference Manual
  4. W3C Page Validation Tools
  5. View your site in other browsers
  6. American Registry for IP Numbers
  7. Test Your Firewall
  8. Test Your Connection Speed
B&T's Recommendations


Site5.com

JQuery.com
You are visitor 1,500,237 (using this script)
Copyright © 2004-2014