Getting your user-agent

I just whipped up a short PHP script to display the user-agent and IP of a client’s browser. I wanted this because I was writing to Citizens Bank about a bug in their home page (a broken browser detection script). The script can be used here and the content of it is very simple:

<?php
echo "Your browser is reporting the agent string: '";
echo $_SERVER['HTTP_USER_AGENT'];
echo "'<br>Your IP address is ".$_SERVER['REMOTE_ADDR'];
?>

Yeah.

Posted in Code snips. No Comments »

Ubuntu: Changing file associations

In Windows, if you want to change the program that is used when you double-click a file, you would need to dig into Control Panel’s Folder Options applet. This is the case of one of those illogical steps Microsoft users memorized becuase of its consistency across all Windows platforms. However, this more logical location in Ubuntu threw me off… Read the rest of this entry »

Posted in Linux tidbits. No Comments »

Make your Verizon phone your own

Here’s a tutorial I wrote up to make custom ringtones for Verizon phones.

NOTE: This tutorial is still in beta, meaning that it may have some rough patches. I am still revising it, and need to test it on other platforms and with other phones. I am not responsible if this causes any physical, mental, or emotional damage to you or anyone else.

Introduction:

Verizon likes to sell things. That in itself is not evil. What is evil is the scheme they have come up with to profit from ringtones. The only way most customers know of to get ringtones is through Verizon’s Tones Deluxe. It has a fairly limited selection of songs (Gummibär doesn’t get any love…) and the ringtones are downright overpriced (a full-length MP3 from Amazon MP3: $0.99. A 30-second clip from Tones Deluxe: $2.99. You do the math). Also, these tones are lost once the time comes to upgrade to a new phone. What most customers don’t know is that they can create their own ringtones and send them via e-mail to their handset.

Let me say that again. It is easy and, depending on your plan, free, to create and send ringtones via e-mail to your phone. Let me show you how. Read the rest of this entry »

Posted in Tutorials. 1 Comment »

[solved] Wordpress: Broken Thumbnail Maker

I can’t figure this out just yet, but I haven’t had a lot of time to figure it out either. It looks like the option to insert a thumbnail is broken in the latest release of Wordpress. (see bottom of this post. I did figure it out)

Broken thumbnail creator

The thumbnail creation buttons are greyed out. (click to see full image)

I go to insert a picture into a post, and I get the screen with information about the picture I just uploaded. The option buttons allowing me to use a thumbnail-sized version of the picture are greyed out, however. The picture inserted into this post is not a thumbnail, but rather a full-size, scaled down by the browser, not the server.

Since this site is currently hosted out of my own basement, I need to conserve bandwidth. I have a cap on my server’s upload speeds, so ultimately not being able to use thumbnails is going to hurt the end user; the site will just take forever to load.

Now, I’ve gotten some hints that this is an indication that I am missing GD in my Apache installation. It doesn’t show up in my phpinfo() dump, so that’s the first thing I’m going to try. I will post back when I’ve got it figured out.

EDIT: Well, I figured out how to install GD; a bit of Googling around found this. It seems to be a bit dated; also, I am using PHP5, not PHP4. Issuing the command “apt-cache search gd” showed me all of the Debian packages with “gd” in the name; the one I want is “php5-gd – GD module for php5″. I ran “apt-get install php5-gd” to install the package. I restarted Apache by issuing the command “apache2ctl restart”, and the option buttons were enabled. Mystery solved!

I give up.

I don’t want to spend all my time messing with the PHP needed to make this nice. Therefore, I give up. I installed WordPress. Now I’m not up to my nose in code.

This might actually be fun!

Posted in Uncategorized. No Comments »