PHP

PHP Modulus Operator – mysql database example

Posted By: Ian on Feb 02, 2012 in Blog, Snippets

OK well recently whilst doing some work for someone on a classifieds site the man wanted a banner from Banner Bar to show every 5 adverts. But he wanted the banners to be shown in ascending order and only 1 at a time. After some playing around and a nights sleep i finally cracked it …

Read more

Sort and order php mysql

Posted By: Ian on Dec 19, 2011 in Blog, PHP

During the building of Banner Bar version 2 i needed sort and direction to be carried forward to each page and this is what i came up with. So for anyone looking hope it helps. I have included a full working demo and download link below anyone wanting the mysql table just contact me. Using …

Read more

Pretest Script for testing versions before install

Posted By: Ian on Dec 17, 2011 in Blog, PHP, Snippets

During the remake of the installation script for bannerbar i had to come up with a pre-test script and with a bit of searching i put together the below which may be helpful for you too.

Read more

Page Creation and Modified Date

Posted By: Ian on Jun 24, 2011 in PHP, Snippets

Recently i was asked to create a script for someone to show the Page Creation and Modified Date of web pages and being as this was for a Linux server where there’s no function for the creation date that I’m aware of like this is for the modified date i had to create a little …

Read more

Get file size

Posted By: Ian on Jun 19, 2011 in PHP, Snippets

<?php $file = ‘demo.jpeg’; echo filesize($file); ?> This function is for use on local files only and will not work on remote files but what you can do is download the file to a temporary folder and then get the size that way. Also note that file results are returned in bytes so would look …

Read more

Banner Bar 125 with Control Panel

Posted By: Ian on Jun 04, 2011 in PHP, Tools

Banner Bar 125 This 125 Banner bar uses PHP and MySQL. Display your banner ads at the bottom of your pages features include:- Choose how many Banners to display at once Banner Bar uses 1 MySQL Database and can be used on PHP or HTML pages. Comes with Automatic installer, All the Banners are randomly …

Read more

Accessible Contact Form

Posted By: Ian on Mar 10, 2011 in PHP, Snippets
Read more

View your ip address

Posted By: Ian on Mar 09, 2011 in PHP, Snippets

Use this simple php snippet for finding out your current ip address.

Read more

Automatically update copyright year

Posted By: Ian on Mar 09, 2011 in PHP, Snippets

This simple PHP function will Automatically update your web pages with the current year which means you don’t have to waste time each year doing it manually and can get on with more important things! The only thing to remember is it takes the current year from the server where your site is hosted on …

Read more

3 Failed Logins and Your Out!

Posted By: Ian on Feb 21, 2011 in PHP, Snippets

Auto lock your login pages with this little script get the login details wrong 3 times and the page is locked out until reset by the administrator! Avoid password crackers and brute forcer’s as the only way to reset this is to delete the log file (a.txt). It is possible to modify this script to …

Read more

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,
Ian.J.Gough

Contact Form

captcha

-
blank1
blank2
blank3
blank4
blank5
blank6
blank7
blank8
blank9
blank10
blank11
blank12
blank13
blank14
blank15