From: Dominik 'R. M. <do...@gr...> - 2006-02-27 11:39:46
|
On Monday, 27 February 2006 at 08:17, David Saez Padros wrote: > Hi !! > > >I'm writing a DNSBL management system that'll make extensive use of > >phpwhois. I'm adding a handler for .pl domains (will send later) and the > >format is so atypical that I've written my own parser instead of using any > >of those found in whois.parser.php. Basically it has some blocks, but data > >within the blocks is RPSL-style except for nserver list and registrar's > >data. > > > >While doing that, I've encountered a bug that caused the nserver > >array to always contain only the last nameserver and only as > >a ["" => hostname] pair. > > > >It took me over half an hour to figure this one out. Patch attached. > > Thanx for the patch, i will add it to next release. You're welcome. Note that I didn't actually test it on PHP4, but it shouldn't break anything, either. > Nevertheles i have to point that there is no need to write your own > parser for .pl domains as that kind of output could be easely parsed by > the current parser routines (you could use get_blocks to get the blocks > and then generic_parser_b to get the data for each block) I'd appreciate some help here, because much as I try to understand the code, it seems overly cryptic, which combined with the complete lack of documentation leaves me wanting to write my own parser from scratch. Also, I think a handler for (some?) .edu domains is missing, try mit.edu for example. Regards, R. -- The Fremen were supreme in that quality the ancients called "spannungsbogen" -- which is the self-imposed delay between desire for a thing and the act of reaching out to grasp that thing. -- from "The Wisdom of Muad'Dib" by the Princess Irulan |