<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
My bad :)<br>
<br>
I have incoming tickets and a whole crap-load of user-data and other
info thats stored in our in-house DB.<br>
<br>
I've written a server-daemon that acts as a databroker to our internal
system, so I can just open a socket to it and make a request that looks
like:<br>
<br>
"GET /username/password/CUST_ID/email:user@emailadress.com/1"<br>
<br>
Which would authenticate against my database for the query, then
requests the Customer ID of the user based on a search of their primary
email: address. I also scavenge data like a contact phone and
priorities and which particular ISP/Division they belong to. <br>
<br>
All of this happens on ticket creation via a Scrip that currently calls
a whole bunch of "my $variable = `lynx -souce $blah`" lines and then
calls some cleanup code to parse the reponse from the broker. <br>
<br>
Im stuck on how to do this 'better'. Obviously, in an external script,
i'd just do my own Socket control via IO::Socket.. but Im having
trouble working out the most efficent way of opening a socket inside an
RT Scrip, writing some data, and then parsing the response. Is there
some built in curl support I can call upon ? LWP built in already ? how
would I go about calling LWP if I wanted to ?<br>
<br>
The response is then used to populate CustomFields inside RT, hence
"this is where its all relevant to RT"<br>
<br>
For background, I went down the whole 'broker' path because this way I
only need to worry about IPC between our in-house apps to the broker
level, and no external apps need to know the complicated selects and
views needed to return a simple piece of data like a phone number of
customer_id. In this fashion, apps just call to the socket with a
fairly 'human readable' command structure to extract data. The
advantage is it does away with needles database socket calls from
multiple apps, and most stuff nowdays supports socket calls of some
description so its easier to just implement that than make everything I
want to talk to it "DB Aware".<br>
<br>
Thanks for taking the time to try and better understand what Im on
about :)<br>
<br>
Adrian<br>
<br>
Todd Chapman wrote:
<blockquote cite="mid20060109043359.GT1765@chaka.net" type="cite">
  <pre wrap="">On Mon, Jan 09, 2006 at 02:38:43PM +1100, Adrian Carter wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi all,
   Just wondering what in everyones experience is the best way to 
scavenge some data via a HTTP GET session to a remote server? I've got a 
data-broker I built to interact with our inhouse DB system, and I just 
need to construct queries like a HTML path to it, and then read the 
results back.

   I currently have some nasty 'back ticks' spawning lynx with a 
'-dump' option then a couple of lines of 'clean-up' regex's... Is there 
a more elegant or more efficent way to do this ?

Thanks

    </pre>
  </blockquote>
  <pre wrap=""><!---->
Somehow I am missing the connection to RT.

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Adrian Carter
Technical Manager
Leading Edge Internet

Web       <a class="moz-txt-link-freetext" href="http://www.lei.net.au">http://www.lei.net.au</a> <a class="moz-txt-link-freetext" href="http://support.lei.net.au">http://support.lei.net.au</a>
Direct    +61 2 6163 6162  Support 1 300 662 415
E-mail    <a class="moz-txt-link-abbreviated" href="mailto:cartera@lei.net.au">cartera@lei.net.au</a>
</pre>
</body>
</html>