• Questions? (908) 864-7283

SiteGround's 70% Off Easter Sale & A Word of Warning

SiteGround's 70% Off Easter Sale & A Word of Warning


Easter is this Sunday, April 20th, and in celebrating SiteGround has announed their Easter Sale starting this Saturday April 19. The sale will last through Monday April 21st and will offer a huge 70% off discount on SiteGround's hosting packages. 70% off ... read more

20% Off on Yola Gold During April 2014

20% Off on Yola Gold During April 2014


If you build it, they will come! Right? Well not really. Luckily the Yola Gold package gives plenty of awesome SEO and marketing tools which you can utilize to build up the traffic to your website and start growing your ... read more

DynDNS No Longer Free

DynDNS No Longer Free


DynDNS used to be THE free DNS service everyone was always recommending. Unfortunately Dyn has recently announced that it’s free service will cease on May 7th, 2014. This means anyone using their free DNS hosting has to upgrade to a paid ... read more

Some New TLD's to Brighten Up Tax Day

Some New TLD's to Brighten Up Tax Day


In an effort to take your mind off the IRS, here's some new fun TLD options, available for general registration as of 4/15: .gift, .pics, .photo, .guitars, .link. Two more batches of new TLDs arrive later this week, so be ... read more

PlainEdit.NET & Sublime Text Added to Free Webmaster Resources Directory

PlainEdit.NET & Sublime Text Added to Free Webmaster Resources Directory


These days it's rare that a new text/code editor comes out that brings anything remotely new or exciting to the table. There are already plenty of code editors and Notepad replacements out ... read more

Get 25% Off on Wordpress Hosting from GoDaddy

Get 25% Off on Wordpress Hosting from GoDaddy


Back at the end of January GoDaddy had announced their launch of dedicated Wordpress hosting plans - and today I am happy to announce their latest sale which gives you 25% off regular list price for Managed WordPress Hosting plans. Please ... read more



PHP/MySQL File Upload – Error Checking

Posted on by Metalp3n in | 2 Comments
Tags: , ,

A while back I had written a PHP/MySQL tutorial discussing how to upload an image to your server, and store the information about that uploaded image into your MySQL database. That tutorial covered really only the basics, and I knew that eventually someone would post a comment asking about some more advanced features – such as limiting the file size of uploaded images, as requested by Evaleen Tan. So this tutorial aims to expand upon the basic file upload functionality that was discussed previously and introduce various error checking features for file size, and file types, etc.

Now, let’s quickly recap where we left off in the last tutorial. We have built our basic HTML form, which requests for the users username, password, and provides an avatar upload field. This information then gets stored into a MySQL directory. So here is our final submit.php file:

 $dbuser = "mysql_username";
 $dbpass = "mysql_password";
 $dbhost = "localhost";
 $db = "db_name";
 mysql_connect($dbhost, $dbuser, $dbpass);
 mysql_select_db($db);
 $username= trim($_POST['username']);
 $password= trim($_POST['password']);
 $avatar=($_FILES['avatar']['name']);
 $target = "avatars/";
 $target = $target . basename( $_FILES['avatar']['name']);
$results = mysql_query("INSERT INTO `users` VALUES ('','$username', '$password', '$avatar')");
if(move_uploaded_file($_FILES['avatar']['tmp_name'], $target))
 {
  echo "The image ". basename( $_FILES['uploadedfile']['name']). " has been uploaded.";
  echo "<center><img alt="" src="avatars/$avatar" /></center>"
 } 
else 
 { 
echo "Sorry, there was a problem uploading your venue photo file."; 
 } 
if ($results) { 
echo "New User Has Been Added!"; 
} 
mysql_close();

So the first thing we want to add to our submit.php file are a few setting options to limit what types of files we want uploaded, and how large we want them to be. We do this by an array of extensions for our file types, and a variable  that stores the maximum allowed size of any uploaded file (in bytes).

  
$allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation.
$max_filesize = 524288; // Maximum filesize in BYTES (currently 0.5MB).

(more…)

1&1 Discontinues MySQL 4 Databases

Posted on by Metalp3n in | Leave a comment
Tags: , , ,
1&1 Discontinues MySQL 4 Databases / internet news  /

Hosting provider 1&1 is “deactivating” MySQL 4 databases starting on May 1st, 2013. All WordPress sites hosted with 1&1 that have not migrated their databases from the old database to the new MySQL 5 databases may have their sites go offline, however 1&1 doesn’t explicitly say the sites will go down. If you host a database driven site on 1and1.com, log in, go to MySQL Administration and check what version of MySQL your site is using.

To quote directly from the 1&1 announcement:

The information below applies only to Linux Hosting packages with MySQL 4 databases. MySQL 4 is being phased out and therefore any data held within a MySQL 4 database must be migrated into a new MySQL 5 database.

Why is the migration not done automatically?
The migration can not be carried out automatically because of some features of MySQL 4 are not supported in MySQL 5 and in order to minimize the amount of transmission and handling of your private data. Because of this we are allowing customers to carry out the migration on their own, at their leisure.

How do I know if my databases are affected?
Any database created in the 1&1 Control Panel that says MySQL 4 as the version, will need to be migrated to a newly created MySQL 5 database. You can check what version of MySQL your databases are by logging into your 1&1 Control Panel and clicking on MySQL Administration from the Domains & Web Space section.

Full instructions on upgrading your MySQL version on your 1&1 hosting account can be found here: http://faq.1and1.com/web_space__access/mysql/20.html

SQL Injections – A Powerpoint Presentation

Posted on by Metalp3n in | Leave a comment
Tags: , ,

If you haven’t noticed more and more web-related services have been getting hacked lately – and these aren’t small websites either. Infragard – an FBI affiliate, the CIA website and the FBI’s Detroit phone network, the threats and attacks on Unveillance, and ofcourse who can forget the Sony hacking that has went on. What the news fails to mention is how often hacking attemps happen for the little guys as-well. Your local pizzeria’s website that has a mailing list, your photography website that has a backend of clients information. I was thinking about this on my drive in to work this morning – well to be honest while I was standing in traffic and I remembered a presentation a friend of mine sent me a short while back about SQL Injections. It was originally a school project but it has some great information that everyone developing or managing a website should be aware of.

SQL Injection by Vadim Gellerman