Archive for the 'Computers & Internet' Category

ProofBuddy 1.0 released

One of my web projects met a milestone a few days ago with the 1.0 release. It took me over 2 years working part time, but 1.0 finally contains the full feature set that I wanted when I started writing ProofBuddy in the fall of 2005.

ProofBuddy Logo

Add a false window to your wall

Posted in Random, Web Links  

If you’ve got an empty wall begging for a window but don’t want to break out the saw to put one in, or just can’t, you might want to look at one of these. It’s a set of blinds with lighting behind to simulate a window where one doesn’t exist.

wall-blinds.jpg

MapQuest adds gas price estimator

Posted in Internet, Unfiled, Web Links  

MapQuest has added a new feature that allows you to estimate how much it’s going to cost to fill up your car for a trip. You enter the miles, how many miles per gallon your car gets, and the cost of gas and the site will show you an estimate of how much it’ll cost you.

mapquestgas_cropped.jpg

FxIF plugin for FireFox

Posted in Web Links  

For those of you using Firefox, there is a plugin available that will allow you to view the EXIF data on any image in the browser by right clicking and selecting Properties.

exif-properties.png

The plugin is called FxIF.

I locked myself out of SSH

Posted in Internet, Unfiled  

A few days ago I tried to change the SSH port of a server I'm working on from 22 to something different since that's supposed to help with security. But the port I changed to was blocked by the firewall which means that after a reboot I had effectively locked myself out.

The server had WHM / cPanel on it so I was still able to manage the server, but needed to get back SSH. Fortunately cPanel has a built in script for this mistake.

Put the following into your browser replacing example.com with the domain name of your server.

CODE:
  1. https://example.com:2087/scripts2/doautofixer?autofix=safesshrestart

Presto. SSH will be back on port 22. One thing you'll need to do is go back and fix /etc/ssh/sshd_config so that it's back on port 22 as well. I found out this morning that this fix doesn't actually change the config file.

ForumsBlogsWikis.com

Posted in Blogging, Internet, Programming  

Yup, another blog.

If you read back through the archives here you'll see that I have a real problem with starting new projects. Not that I have a problem starting one. I have a problem starting too many. Right now I've got 2 forums, 1 eCommerce site, and 6 blogs (only 3 of which are regularly updated).

But, I had an idea for a new blog so about 2 hours after I registered the domain name ForumsBlogsWikis.com is live. The idea is to keep up with news on any web programs that allow interaction with your visitors.

Download script using PHP

Posted in Programming  

This is a short PHP script that I use on my DailyFont.com site to handle downloads. Sure it's easy to just link to the zip, but this allows me to keep track of how many times each file has been downloaded which I then use to rank the fonts on popularity.

PHP:
  1. <?php
  2. include('shared.inc.php');
  3.  
  4. if (!is_numeric($_GET['id']))
  5. {
  6. die();
  7. }
  8.  
  9. $rs = mysql_query("SELECT file_name FROM table WHERE id='".$_GET['id']."' LIMIT 1");
  10. if (mysql_num_rows($rs)==0)
  11. {
  12. header("HTTP/1.0 404 Not Found");
  13. die();
  14. }
  15. $row = mysql_fetch_row($rs);
  16. $fhandle = fopen('files/'.$row[0], 'rb');
  17.  
  18. $zip_data = fread($fhandle, filesize('files/'.$row[0]));
  19.  
  20. header("Content-type: application/zip");
  21. header('Content-Disposition: attachment; filename="'.$row[0].'"');
  22. echo $zip_data;
  23.  
  24. //    Update download counter
  25. mysql_query("UPDATE table SET download_counter=download_counter+1 WHERE id='".$_GET['id']."' LIMIT 1");
  26. die();
  27.  
  28. ?>

The actual script uses a slug for each font similar to how WordPress uses the permalink structure. I decided to go this way rather than an id number because it would be neater. Plus the download link is /font_slug/download/ rewritten with a mod_rewrite call to this script.

I've seen lots of download management scripts that are called using something similar to download.php?filename=myfile.zip. This is potentially a really big security risk. If somebody typed in download.php?filename=/home/yourusername/.htpasswd they might be able to get your username and password. For that matter download.php?filename=/etc/httpd/conf/httpd.conf would pull up your Apache config file if your server isn't configured tightly enough.

Along the same security lines, lines 4-7 of the code above make sure that the id number passed is numeric to keep people from trying to send random commands to your database server.

Irfanview 4.0 released!

Posted in New Releases  

I've been using IrfanView for years as my default image viewer. Today the author released version 4.0.

Changes include Vista compatibility, toolbar skins, EXIF improvements, along with a host of smaller improvements.

osCommerce and duplicate content

Posted in Programming  

If you've got an osCommerce store set up you are probably fighting a duplicate content problem with the search engines. The problem is that OSC has an almost limitless number of ways to view any one particular product page - 1 for each category that the product is in plus one without any category information. The cPath variable in the query string is the culprint.

Here's how I got around it and my search engine traffic, as small as it is, has been growing. Read the rest of this entry »

Photoshop template blog

Posted in Blogging, Photography  

A few months ago I started my first ecommerce site at TikiTemplates.com where I have several Photoshop templates aimed at photographers available - some free, some for sale. And to try and draw a few visitors over there I've posted a couple times here with new templates. Fortunately I found a post on embedding WordPress in osCommerce and set up a new blog on my TikiTemplates.com site and this blog will get to go back to the random photography and PHP postings that fill up the most space.

« Previous Entries