connect to an altered perl opensrs client (you state that you do not need
the opensrs client)?
Anyway, I (and a fellow co-worker of mine;) have created a similar php/perl
wrapper for opensrs, which I dont intend to use anymore, since the 100% php
opensrs client 'works' now. It is basically a large php object, containing
*all* the opensrs actions (of version 2.2) and the code to pass it to the
modified perl script and vice versa, here is a working example in php code:
$srs = new OpenSRS;
$lookup_domain = new OpenSRSActionLookupDomain("domein.com");
$srs->AddAction($lookup_domain);
$srs->ExecuteActions();
$result = $lookup_domain->GetResult();
print $result["response_text"];
Yes, you can add as many actions and then execute them all concurrently, I
(ofcourse) bumped into some opensrs specific 'things'; I was planning on
creating special support for cookies, so you can log in, get cookie info,
do some actions that require the cookie, destroy the cookie (log out), all
in one session, instead of two.
The passing of hashes/arrays between php and perl can be improved (I was
thinking of using shared memory), it currently works thru a half-baked pipe
solution; the hash from php to perl is saved in a temp file, the perl script
is started from php with the location of the file as an argument, it does
the magic opensrs thing, and prints the return as a php hash/array to stdout,
which is then parsed by php. I regret the file operation, but it was the
easiest thing to do (and proved useful in debugging the clients ;).
I have made a quite extensive manual for the php functions (since all the
real opensrs stuff is now done in php, the perl client is used solely for
communication, since I ran into the CBC problem when I was porting my own
php opensrs client and could not solve it), but it's all in Dutch.. :]
Please reply so I can see if anyone is interested, so I can mail it as an
attachment to the dev list (dont want to force it to ppl ;).
-Arjan Wekking
At 03:59 29-1-2001, Kit wrote:
Okay, the OpenSRS PHP Wrapper Demo took longer that I've expected. Mainly
because I was busy with school. I also had to redo much of the code in
order to create a demo that would allow the user to check out how things
work without giving too much away. :)
Email me if you are interested in PHP Wrapper Demo. They are actual scripts
and templates that you installed on your computer. It not the actual
working version I have installed on my computer, but similar and limited.
You don't need to install and PERL modules or even the OpenSRS client!
--Kit
