Fix DD-WRT Lighttpd error "(server.c.1105) fdevent_init failed" on Asus WL-500

Tonight I was messing with my Asus WL-500 and was having trouble getting lighttpd to start. I found some post in russian that I was able to decypher thanks to my excellent linguist skills (haha). Anyway, it’s pretty easy. # ipkg install nano # nano /opt/etc/lighttpd/lighttpd.conf and then change # server.event-handler = «freebsd-kqueue» # needed on OS X to server.event-handler = «poll» # needed on OS X After changing this, lighttpd started right up with fastcgi php....

November 5, 2009 · 2 min · 336 words · Matt G

Creating Quick Scrapers Using Xpather, Snoopy & PHP

I’ve been working on a bunch of review sites, and because of this I’ve had to gather some data from websites – mostly stuff that’s not included in the data feeds that I’m using and wanted to compliment my information with some additional specifications for my users to check out items this coming holiday season, with ease, and hopefully make them click happy for purchasing J I started out reading a bunch of tutorials on using Curl and PHP to scrape and even built a little scraper that worked fucking awesome for the page I created it for, it had 21 regex’s, and used a bunch of curl lines to connect and grab the information I needed....

October 14, 2009 · 7 min · 1380 words · Matt G

Dirty way to get Zip Code from a visitors IP, City and State using MaxMind GeoIP

As we mentioned in our previous post, the MaxMind geoip database doesn’t do too well with getting the zip code of users that visit your sites. We had a use today to grab the zipcode and popular an area of our site with it, and we’re going to show you how to do it as well. This assumes you already have GEOIP working, and are using the standard free database, and our zipcode database tutorial....

August 27, 2009 · 3 min · 464 words · Matt G

Uploading Prosper202 GEOIP Database remotely on memory limited hosts.

Like me, you may be hosting your Prosper 202 installation on a cheap hosting account. This may lead to issues if you want to import the GEOIP database so you can track by country. Many hosts won’t allow a file this large (20 something megabytes) via phpmyadmin. So, how do you get around this? In my case, it was pretty simple. I went to the control panel for my hosting, added a new database user that was allowed to connect from anywhere....

August 26, 2009 · 1 min · 174 words · Matt G

Listing all IP’s on a Linux Server when Setting up a Squid Proxy made easy with this script

A few days ago a buddy of mine asked me to setup Squid Proxy on his server. He wanted the ability for it to listen on all available IP’s on the box (512 of them). So, if you used proxy at x.x.x.x it would go out x.x.x.x and y.y.y.y would go out y.y.y.y and so on. After a little digging we found a neat little script written for FreeBSD that would parse all available IP’s on the box and generate the squid configuration for you, saving hours of tedious hand typing....

May 27, 2009 · 1 min · 160 words · Matt G