Inspired by kitty0's GeoIP Demo, I created two scripts which automatically import the free MaxMind GeoIP database (which resolves IP addresses to city locations) into SQL Server using VBS and BCP. The VBS file can be set as a Scheduled Task for MaxMind's free once-a-month updates. I also created a SQL Server UDF to …
Read MoreEarlier today, I pasted some code into a Linux-based vi via putty/ssh, saved it, zipped it, and downloaded it to a Windows machine. The result was pooh; the code ran but was garbled in notepad. I wondered if I could somehow run a command in Linux to clean/convert all the carriage returns. One of my friends at …
Read MoreThis user-defined function (only available in SQL 2000 and above) is part of a larger project I'm working on. PARSENAME in SQL Server is my new favorite function.. Thanks to Jeff Smith for the heads up. CREATE FUNCTION [dbo].[IPtoNumeric] (@strIP varchar(255)) RETURNS bigint AS BEGIN DECLARE @intIPNum bigint IF …
Read MoreWow, have ya'll seen the new Google Groups interface? It's sex on legs. Image not found Web path: https://blog.netnerds.net/images/googlegroups.gif Disk path: /static/images/googlegroups.gif Using Page Bundles: false Now if only they'd put back "Groups" in the main Google navigation text.
Read MoreUpdate: If you are an iTunes user that needs VBScript, this page won't help you. Please visit the following two sites for two different solutions: Apple Docs and KeathMilligan.net. This is an old script I dug up which I call "fileFetch". It's a script that downloads a binary file using XMLHTTP and saves it …
Read MoreI've used CDONTS for years, even though it hasn't been included in a Windows Server release since NT4. Anytime I needed to send mail, I'd copy over CDONTS.dll, register it then use my old CDONTS code. Not sure why I resisted it for so long.. I think the weird Configuration Fields were too odd to accept. But I've …
Read MoreThis is some super old code but I used it recently and figured I'd archive it on this site for my future reference. The sample code below aims to allow authenticated users to download files which are not available via direct download (ie. files within the web root). The script accomplishes this by doing the following: …
Read MoreI keep track of all hits to my website RealCajunRecipes.com in a SQL table called hitcounter which has columns for the user's IP, browser, referring URL and the date. Recently, I saw a surge in traffic and wanted to know which domains were sending the traffic our way. After getting tired of issuing ad-hoc queries that …
Read MoreRecently, a user trying to login to OWA encountered the following error: HTTP 403.1 Forbidden: Execute Access Forbidden You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed. Another network administrator noticed that the URL was strange …
Read MoreI've got two 10 page papers to write by Wednesday so I figure there's no better time to write a post about the things you can find in my Swiss Synergy backpack. This backpack is rather large but its size often comes in handy (grocery store trips and school finals come to mind). I used to value micro sized bags but …
Read More