Re: [openSRS-PHP-dev] A bit of explanation ?
Brought to you by:
cviebrock
From: Wim G. <wi...@go...> - 2001-07-12 22:33:05
|
This explains a few things, but I still have a problem : how do I extract data I get ? How do I access the data in the $result variable ? I don't want the whole chunk, just a few things out of it... Michael Wojciechowski wrote: > > well, frankly speaking you don't need to know anything about XML from what I > understand. > > All that is necessary is that you create hashes with the required > information and send it over using the send_cmd() function in > openSRS_base.inc ... > > Here's a quick example: > > function Lookup_domain ($domain_name, $reg_ip, $aff_id) { > > $data = array( > 'action' => 'lookup_domain', > 'object' => 'domain', > 'registrant_ip => '$reg_ip', > 'attributes' => array( > 'domain' > => '$domain_name', > 'affiliate_id' > => '$aff_id' > ) > ); > > $result = send_cmd ($data); > > return $result; > > } > > where the function is inserted into the OpenSRS.inc library (as one of the > possible locations) ... you just need to find out what the keys are called > from the tech. specs of the original OpenSRS front-end interface written in > PERL. I believe the document is called OpenSRS v2.33 Client Protocol > Specification (at least that's the one I'm using) ....in this case i called > the send_cmd() command from within the function inside the class....you > could call it from outside of the class by creating an instance of the class > and so on.... > > On a separate note, I have a question however....how do you use the > Validate() function located in openSRS_base.inc? It takes two parameters: > $data and $params=array() ... what are they? is $params=array() a hash of > domain name contact info for example? what is $data? Help would be > appreciated! > > Happy coding, > > Michael Wojciechowski > > -----Original Message----- > From: ope...@li... > [mailto:ope...@li...]On Behalf Of Wim > Godden > Sent: Thursday, July 12, 2001 7:42 AM > To: ope...@li... > Subject: [openSRS-PHP-dev] A bit of explanation ? > > Hi, > > Can someone give me some more explanation on how to use opensrs-php ? > I've got it installed, but how do I get to use it now ? I want to be > able to lookup domains, register them, etc. but I don't know anything > about XML. How do I extract data from the server's answer ? > > Kind greetings, > > Wim > > _______________________________________________ > opensrs-php-devel mailing list > ope...@li... > http://lists.sourceforge.net/lists/listinfo/opensrs-php-devel > > _______________________________________________ > opensrs-php-devel mailing list > ope...@li... > http://lists.sourceforge.net/lists/listinfo/opensrs-php-devel |