Snippets

Download and Upload Images to your site

Posted By: Ian on Apr 05, 2012 in PHP, Snippets

Most people talk about downloading an image from a website to there computer but there are times when we need to download an image from a website to our website (Via a Link). Which following on from Download image to website I have combined this with an upload script, image proxy script and optional image …

Read more

Download image to website

Posted By: Ian on Mar 28, 2012 in PHP, Snippets

Download images to your site from another site. Linking to images is fine if there on your site but not necessarily a good thing if there on someone else’s. WHY? Because for one the site owner of the other site can change the image, alter the size or even delete it. Why this might not …

Read more

Image Proxy Script

Posted By: Ian on Mar 28, 2012 in PHP, Snippets
Read more

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

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

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 php function for finding out your current ip address. View your ip address here

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

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
Powered by Banner Bar 125