Setting up IP-to-Country database

October 13th, 2009

Webhosting.info updates a csv file that matches IPs to countries and offers it to the public free of charge. The latest csv file has over 96k records.

Here is how to load the csv into the database on your webhost for those who do not have unix access:

Assumptions:

  • You have PHP 4.3 or later
  • You have FTP access into your account.
  • You know the database login information.
  • You’ve created the table in the database to hold the data.

Steps:

  • Download the csv file from this page.
  • Unzip the file and open the resulting csv file in a text editor.
  • Find and replace ‘ with \’ and save.
  • Download BigDump (created by Alexey Ozerov).
  • Unzip the file and open the resulting php file in a text editor.
  • Fill in the database info, the filename (ip-to-country.cvs) and the csv_insert_table (iptocountry).
  • Upload the bigdump file and the csv file to a temporary directory in your account that is web accessible.
  • Navigate to the bigdump file in your browser and click the start link.
  • Watch the progress bar.
  • Profit.

Steven Internet , ,

mod rewrites broke my POST forms

September 26th, 2009

I had set up a site nice and proper with an CM admin subdirectory. Added the requisite mod rewrites to make the URLs pretty. But, for some some reason, it broke all the forms in the admin subdirectory that used POST as its method. The forms would redirect to the 404 page.

The solution to this problem after much searching was to add Option +FollowSymLinks to the head of the .htaccess file. Everything worked perfectly afterwords.

Steven Internet ,

Writers’ Block and the Awesomeness of Skid Steers

April 23rd, 2009

Can you believe it? My stream of consciousness practice has ended after one day. The second day, I was sitting at the computer and drew a complete blank. I blinked and 10 minutes had passed on by. I am probably not cut out to be a writer; although it was an interesting path when I was younger.

I am going back to what I am best at which is building random websites for kicks and giggles.
Read more…

Steven Internet

Stream of Conciousness #1

April 16th, 2009

I read somewhere that if you don’t use it, you’ll lose it. It being the ability to write. Researching on this subject, one solution to keep the ability sharp was to write for a set time limit every day. So that is what I am going to do. I am going to start at a set time and write for 10 minutes straight on whatever I can to fill the full 10 minutes.
Read more…

Steven SoC

CA Bill 178 - Update

April 10th, 2009

Performance Marketing Alliance reports:

The hearing to discuss [CA Bill 178] has been moved to April 27th (2nd or 3rd delay). We have heard anecdotally that the committee was surprised at the opposition to this bill. Beth Kirsch and Brad Waller are coordinating district visits, and are looking for participants. If interested, email: district_visits@performancemarketingalliance.com. Karen Garcia, and Brook Schaaf are considering another possible visit to Sacramento. If interested, email: lobby_day@performancemarketingalliance.com. Beth, Brad, Karen and Brook are also organizing editorial visits with mainstream press.

Steven Politics

CA Bill 178 - A lesson in not seeing the big picture

April 9th, 2009

I was reading the backlog of news the other day and I stumbled on a surprisingly short-sighted bill which is equivalent to the Warriors signing Maggette in a panic move after Baron skipped town.

CA Bill 178 is authored by Assembly Members Nancy Skinner (D) and Charles Calderon (D). The bill adds this paragraph into the Revenue and Taxation Code:

(5) Any retailer entering into an agreement with a resident of this state under which the resident, for a commission or other consideration, directly or indirectly refers potential customers of tangible personal property, whether by a link or an Internet Web site or otherwise, to the retailer, if the cumulative gross receipts or sales price from sales by the retailer to customers in this state who are referred pursuant to these agreements is in excess of ten thousand dollars ($10,000) during the preceding four calendar quarterly periods. This paragraph shall not apply if the retailer can demonstrate that the resident with whom the retailer has an agreement did not engage in referrals in the state on behalf of the retailer that would satisfy the requirements of the commerce clause of the United States Constitution during the four quarterly periods in question.

After a quick skim, it looks like the state wants to apply sales tax to transactions made between online retailers and the local populace on the condition that the retailer has made more than $10,000 in sales in California in the past year. These retailers currently do not charge sales taxes in California because they do not have a physical presence in the state. That sounds reasonable, right? They do business here, we tax them. It’s the American way.

But, if you were to read the bill more carefully, you would see a major blunder on the part of Assembly members Skinner and Calderon. There is a loophole in the text which allows retailers to sell to California tax-free and those that get burned again are the residents of California.
Read more…

Steven Internet, News, Politics

The Golden State Warriors are Frustrating

March 15th, 2009

Usually, I don’t talk about sports on this blog, but watching the Warriors always makes me mad for some reason. It takes a special kind of person to be a fan of the Warriors. Someone who can stomach bad basketball, horrid coaching and an even worse front office.

The season is basically over for the Warriors. They are down by 20 going into the 4th against the Phoenix Suns. Nellie and Jackson has been ejected. So, naturally, the stand-in coach Keith Smart, should put in the rookies to give them some burn. Does that happen? No!

Who does he roll out there but Ellis, Crawford, Azubuike, Maggette and Turiaf. What the hell is he trying to do? Are they going to play team-ball and try to give the gung-ho effort of coming back to win a meaningless game? If you’ve seen these players play, besides Turiaf, team-play is not in their vocabulary. So, rather then giving twelve minutes of experience to the lotto picks on the bench, we get to watch a bunch of veterans with no upside hoist up shots in a game with no meaning.

Great job, guys. Thanks for turning the clock back and reminding us of the previous decade of suck we’ve already lived through.

Steven Sports

Another move to a new server

March 11th, 2009

Moved Frobie to a new server. I had trouble getting Wordpress working correctly and ended up having to change my theme. Unfortunately with the change, I lost all the images in my posts. This theme is decent. I noticed it’s missing the links section though.

I blame Facebook for the long delay between posts. With their one line status updates feature, I no longer have the inclination to write longer posts.

Steven Internet

Window Browser does not define a tag for Microsoft Windows

January 26th, 2009

I’ve been working with SilkTest lately at work. I find the tool quite frustrating due to the lack of documentation. I encountered an error when running a testplan this afternoon. The error was:

Error: Window Browser does not define a tag for Microsoft Windows

Borland’s recommends the default browser to be set to the correct browser version. I’ve been using Internet Explorer 6 as my default browser since the dawn of time. To fix the problem, I set the default browser to none. Restarted SilkTest and set the option back to Internet Explorer 6. That seems to have fixed the problem.

Steven QA

I see ghosts.

January 21st, 2009

Or what I thought was a ghost. I was rubbing my eyes just now and looked back up to the screen. Out of the corner of my eye, I saw a ghostly apparition that looked like smoke curling into a vaguely humanoid form. When I turned to look, it disappeared. Is that how ghosts operate? They don’t let you look at them head on and only allow glimpses to fool your senses. Tricky bastards!

Steven Random Thoughts