Discussion in 'Domain Tools' started by danielcoates, Jan 23, 2016.
Does anybody know of any guides to using both EPP and DAC?
Preferably with BASH, PHP or C?
This may help
I have read both of those, and I'm still a little confused
What are you confused about exactly? Have you any knowledge of programming?
I have basic knowledge of BASH & C (and I mean basic), with a working knowledge in PHP. Most of what I have programmed in the past, have been simple database web scripts, I have never needed to progress further than that.
I learnt what BASH and C I needed to manage Apache, and set-up vhosts and things like that, never really went much further as I had PHP for the rest.
DAC: I have figured out how to Telnet into the DAC server, and that's helpful, but I need to be able to process the data into a file, for further checks, and this is where I am confused, how to I pipe the data to a txt file, or is Telnet the wrong way to go.
If so, just point me in the direction of the correct program, and I'll figure the rest out.
EPP: I have no idea where to start here, I am reading up on XML, and I'll figure something out from there, when the time comes, but for now, I am more interested in checking domains, than registering them.
From your reply, I'd suggest that you are not ready to be programming to the levels needed. I'd read up on network socket programming and see how confident you feel with it. In simple terms you open the port, write to it and read the response then deal with the response however you see fit.
Nominet do not provide any code samples, they expect you to roll your own and most here who have done so will keep cards close to their chest as I'm guessing most have only written their code for catching purposes. If you understand network programming, then it's really quite simple to code something.
So what code do catchers need to be most proficient in these days? Scripts made entirely of c++, php, a mix, or something else completely?
Wish I had paid attention to coding years ago!
Thanks Monaghan, that was the sort of nod I was after 'Reasearch Network Socket Programming', I'll look into it
As for not being ready, I'm not writing a catch script, just a list manager to automate checking my lists. When I get a little more confident I may look at doing that.
Asking a domainer to reveal there trade secrets would be like asking Google to give Yahoo it's algorithms, and I'm not asking for that, just a nod in the right dirtection.
EDIT: Please see later post, and correction!
I've been looking into speed of languages over the last couple of days, and Python seems to be the fastest from what I've read, when I'm back at my pic I'll post some links.
From what I have read on here it seems to be more to do with the latency to the Nominet servers
If you wanted raw speed, go assembly, long slog though. MASM makes me shudder and shiver
With PHP for your current needs you don't really need to look into network programming, off the top of my head code would look like
$sock = socket_create(af_inet, sock_stream, 0);
socket_connect($sock , 'dac.nic.uk' , 3043);
socket_send ($sock, "dom.uk", strlen(6), 0);
//do as you need to do.
socket_send ($sock, "#exit", 5, 0);
Put a loop in to send multiple names, write to a database whatever, you need, but all the nasty network programming is done by PHP, the above it petty ALL the network programming needed for your needs.
Assembly, nah, I'll steer clear of the a for now!
Thanks, Skinner, that's a great help
Nah - C kicks it's ass!
If a command takes 50ms to execute with one language and 5ms with another then latency will be an irrelevant factor.
Of course, if the language goes through the same common underlying C library files included with the OS then the actual language the control looping is written in is not going to make that much of a difference once the issue of compilation is removed from the equation as this mostly affects start-up time rather than execution time.
Python and PHP are interpreted languages. Any routine you write in those languages can be faster executed in assembler or C. I think people are getting too hung up on latency - although that is one factor it becomes irrelevant if your code is full of slow loops, function calls, even something as simple as variable declaration *if* you are going to have to pass through an interpreter before you even get to a precompiled library. Also my statement still stands - if your code requires 50ms to run something that can be run at 5ms in another language you are at a disadantage. I believe it was Alex here who had suggested reading about networks and socketing. This is a must. If these routines are poorly written or slow you will be wasting time trying to catch. Of course for compiling lists speed isn't an issue and, as mentioned, PHP socket handling is probably one of the easier wrappers to use.
I have to hold my head in shame, I've re-read one of the articles, and I got the languages the wrong way round! Did I mention I'm a newbie at this?
The article I read states that C++ is faster than Python, and I got them the wrong way round, and yes, I know C++ is not the same as C, and that there will proberbly be performance differences in that too.
The Article: C++ vs. Python vs. Perl vs. PHP performance benchmark
Also, I'm not trying to write my own catch script, I'm nowhere near that level, yet!
Agreed, however, if using PHP then you'll probably end up going through the same C library as if you'd written it in C and with a modern computer, you'll probably still be spending a long time in your delay loop (so you don't break your DAC access rates) even if using an entirely interpreted language. The whole picture needs to be taken into account. For raw speed, then assembler is the way to go, for ease of ongoing maintenance, then a high level scripting language is ideal and a lot easier to write out those results into a database
Who's for Rob and Alex have a script speed off battle
Heh we are saying the same thing - write in assembler for speed. C if you can't write in assembler. Then PHP as a last resort
No thanks, gone are the days of looking through the processor documentation to compare the number of CPU cycles each OP code takes and then building the fastest code by hand!
Even on an basic modern CPU you can poll the DAC with a simple PHP loop much faster than the limits allow, I even had to slow down my 1st attempt (many years ago now!) written on an old Windows server in C#
Separate names with a comma.