• Questions? (908) 864-7283

Flash Hosting Sale at iPage

Flash Hosting Sale at iPage


iPage has kick-started a flash sale on hosting packages starting today and lasting through till Friday this week. This new sale brings down the iPage $1.99 plan to just $1.68/month - which for unlimited space & bandwidth, plus over $175 in ... read more

Eleven2 Summer 2014 VPS Sale

Eleven2 Summer 2014 VPS Sale


Eleven2 has launched their Double Double VPS Sale which doubles the RAM and Storage Space on all Eleven2 VPS packages! This means that the starter VS-100 package will now include 2 GB RAM and 240 GB Storage for only $49/m. That is $40 in ... read more

Free Counters Hosting Relaunched

Free Counters Hosting Relaunched


The Rapid Purple free counter hosting service originally came around due to the popularity it held back during the times of Next Designs. It requires, literally, about 30 seconds to sign up for a counter – and the best part is that ... read more

New Study Shows Fake Googlebots Used for DDOS Attacks

New Study Shows Fake Googlebots Used for DDOS Attacks


Googlebots are an essential part of the Google search engine. Constantly crawling the world wide web looking for new links and websites to ensure that you get the latest ... read more

Google Adds Sitelinks to Adwords

Google Adds Sitelinks to Adwords


Google announced over the weekend the introduction of dynamic sitelinks that appear below a Google Adwords advertisement. These dynamic sitelinks are automatically generated and can send customers to a page on your website that’s highly relevant based on recent search activities. ... read more

Google Updates Local Search Algorithm

Google Updates Local Search Algorithm


Google has released yet another new algorithm, this one attempts to provide more useful, relevant, and accurate local search results. The new algorithm changes will be visible within the Google Maps search results and Google Web search results. The main set of changes ... read more



PHP/MySQL File Upload – Error Checking

Posted on by Michael Boguslavskiy 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 Michael Boguslavskiy 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 Michael Boguslavskiy 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

Sign Up To Our Newsletter

  • Stay Updated With All The Latest Webmaster News
  • Be The First To Hear Of New Hosting & Domain Name Coupons & Sales
  • Get Exclusive Webmaster Freebies

Sign up today and I'll send you a free gift!

Stay Connected With Us

Stay in touch with us by following us on Facebook, Twitter, and Google+. There's always plenty of new articles being shared that you won't find within the Rapid Purple blog.