Tag Archives: Download

Accessing Your Drop Lists

In previous parts, I covered DAC Connections, then Part 1: What You Need To Build A Drop List, Part 2: Building A Drop List, Part 3: Maintaining A Drop List and now Part 4: Accessing Your Drop Lists. 

There really is no point to having a populated zone file, if you are unable to access it for any reason or produce your own drop lists. This article will cover those who have populated the zone file, but also for those who make lots of searches to see what exists. This latter point, is more about research and mark/rights protection, as well as finding potential buyers, and part of this article will suit your needs too.

Downloading Todays List

This is the basic, downloading todays drop list, you can of course modify this to download any day you choose. 

The above will simply download todays file, I would suggest including a switch to change the date, but its up to you, how you do it. 

Searching The Database

Suppose you want to search the database and browse online, I have gone with absolute basics which is Domain and Drop Date only. A Very simple form is all that is needed.

I have added some embellishments such as showing some useful dates to use for reference but these aren’t needed. I have also set it to clear the boxes when clicked to avoid crossed data on submit. 

Displaying Drop Lists and Data

Once you have submitted the search query using a form, or converted it to a GET[] rather than POST[] you need to display the results.

Firstly, you need to connect to the myql database…

I keep this in a function, with success or fail returned, but you an just bung it at the top of your file, its down to you. 

You will need to know if the form have been submitted and extract the Drop Date or Domain string.

You don’t need to do this, but I always do it with any database query. Sometimes it only shows in debug mode, sometimes in the main view but I always have it in there. You’ll need to alter the Query a little for Drop Dates and Domain searches, but I’ll go with Domain Search code here.

This is useful if you want to know how many records are returned on the given date or within the search query. You may deem it not worth while but thee codes there anyway. You should build this action in to the below code, rather than run it twice, but since you may not care how many lines I’ve omitted it below. I have also switched to dropdate search since I posted a search query above.

You probably should add a switch to adjust the background of each line to make it less headache inducing to read. I’m sure there are a dozen different ways to do this, but I went quick and easy to read code.

Insert the above “if…then” statement into the “do…while” code block. Putting it there means on each iteration lalt (line alt) will change from 0 to 1 and the colour panels will change each row. Something like this would work…

So thats a simple displaying a given date. How you get the date to the above page is down to you. You can either use a GET[] or a POST[] function to get the date and pass it to the code. I would use a form to feed a POST[] array and then act, but a GET[] can be useful to quickly change date…

Then call the page with “dropdate.php?dd=2016-11-24” or similar. 

Other Applications

These are just some ideas I toyed with, Domain Watchlists, you could set up a Crontab for certain keyterms, and when the application detects the keyword in any given days list, it sends an email with the domain list. 

The download script I posted at the top of this could be very easily modified for this job. 

If you have your own tag, you could create a watchlist to watch your tag and track renewals and modifications or any other tag if you stored tag data. 

How much data you store, is subject to Nominets allowance and your own personal choice.

I have a few more things to write about this, but this concludes the basics. I’ll do a summery post and perhaps put the code together in to a workable solution but 95% of all the code you need in in these files and just needs sticking together.

You should now have a 2-3gb database, populated with around 11m records, and able to produce your own drop lists.

Important Notice

Before using this or any of the code I have posted you should sanitise it and enhance security, this code is NOT meant for public use. In order to keep the code simply, it has been aimed at private access so security hasn’t been a huge concern.

DO NOT DEPLOY THIS CODE.  

 

A Manchester Based Photographer and Website Developer with interests in Strongman, Fitness and Geekery.