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.
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.
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…
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…
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.
EDIT: The links in this post no longer work; I have taken down the Secret of the Solstice repository. The plugin for the repository can be downloaded through this page.
I encountered a problem after pushing the Secret of the Solstice repository live. As you click through the pages to the various items, the browser title remained the same throughout.
If someone were to search for the Anti-Death Penalty Pendant 1% on a search engine, the only listings which would appear would be the main SotS page if by chance the item was listed under the latest gears column or the main gears page. The actual item page would not appear due to the browser title being the same as the main gears page.
A little background info on how I set up the pages.
Read more…
Just managed to upgrade from WordPress 2.5.1 to WordPress 2.6 via the 3-step Upgrade Process. The new features are awesome. I especially like the Image Captions which will save me time for having to do it myself through HTML and CSS.
A week or two ago, I lost internet access. I checked the router and the settings were not changed. The other computer had internet access. I checked my ethernet cable, my ethernet card, and fiddled around with the Windows network settings with equally negative results.
Turned out my problem was following the Windows Automatic Updates’ recommendation to update to XP SP3. A whole bunch of people had the same problem as me after installing SP3. They would receive the “limited or no connectivity” message on their network icon and pull their hair out trying to find the cause.
A simple uninstall of SP3 through the Add or Remove Programs tool under the Control Panel fixed the connectivity issue.
Forward three weeks later, the automatic update from Windows struck again, installing a security fix which seemed to fix my internet connection to not allow me to connect. Again, the only workaround was to uninstall the fix. And turn off the automatic update so this does not occur again.
This may have been a ploy by Windows to push everyone towards Vista!
I usually use the Opera browser for administrative purposes as part of my work. Firefox and Internet Explorer are relugated to their status as test browsers.
Anyhow, while madly clicking away on the Opera window, I noticed the pages would jump back and forth. Turns out that holding down the right button while clicking the left button will go back one page and vice versa for holding down the left button while clicking the right button.
Improvements upon the user interface continue to make large strides forward!
From the official site, CAPTCHA stands for Completely Automated Public Turing Test to Tell Computers and Humans Apart. If you drop the “to” and “and”, shouldn’t it read CAPTTTCHA instead?
CAPTCHAs are those images you see with a phrase in them. The user has to type in the phrase they see in the image and the script upon submission will compare the user phrase with the saved phrase. If the two match then the submission goes through; if not, the user is booted back to the form usually with an error message.
The reason for the use of CAPTCHA images is to tell computers and humans apart as the meaning says. Computers have a hard time determining the phrase because of the other lines criss-crossing over the letters, so scripts can’t be run on the comment form.
Read more…