Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: perl script accesing another server

by wardk (Deacon)
on Jul 26, 2001 at 20:08 UTC ( [id://100031]=note: print w/replies, xml ) Need Help??


in reply to perl script accesing another server

If I understand the issue correctly, you have info on server 1 that you really just want accessed/displayed on server2

I've done this sort of thing numerous times to get data from locked systems to an "enternal" source. i.e. getting oracle billing data to a customer without letting them actually touch a box that is directly connected to the network oracle is on. Another project I am working right now, allows an external division across the world invoke our CGI input screen without actually using them directly....i.e. they use their existing interface, which calls my system passing what would have been entered into our forms. they then have to parse some specially formatted output that indicates the status of their requests, but we have made that fairly easy by creating consistent markers they can use to snag the real data...the biggest hurdle we face is that the system calling us is ASP based, getting them to figure out how to do what LWP does via ASP, and parsing without the benefit of a regex.

If this is the case, simply create all the web pages on the source server1, then use a front end on the access server2 call server1, redisplaying the data on server2.

LWP can make this fairly easy. And it's damn fun.

of course, if I misunderstand the problem....nevermind :-)

  • Comment on Re: perl script accesing another server

Replies are listed 'Best First'.
Re: Re: perl script accesing another server
by philbe (Initiate) on Jul 27, 2001 at 14:46 UTC
    Dear Wardk (and the other people helping):

    I think the main problem is that I'm a novice in Perl, no matter if my script works and is 10,080 lines long (390 K). Your solution sounds good but I need to learn a lot about LWP.
    Just in case you have nothing better to do (!!!), I will tray to explain "the thing" (and sorry for my english):

    I have a domain (lets say "www.philbe.com")hosted in a Verio server and there is where my script resides.
    Filling some forms the users can create a set of 5 web pages that can be created and edited at anytime by themselves without knowing nothing about HTML.

    Here is a piece of the script:

    #!/usr/local/bin/perl ............................... ............................... # Form : for user input to crate the Headline: <b>Top Of Page:</b>\n"; print "<p><b>Headline:</b>Big Page Title At The Top - required)<br>\n" +; print "<input type=text size=40 name=\"headline\" value=\"$head\"></p> +\n"; ............................... ............................... # writes te input into a flat file ............................... ............................... #Creates Dir and Page sub dirs mkdir ("$base_dir/$pagename", 0777) || die("Could not create user dire +ctory:"); mkdir ("$base_dir/$pagename/page1", 0777) || die("Could not create use +r directory:"); .............................. .............................. #Page 1 creation open(HTML, ">$page_dir$pagename/index.htm") || die "I can't create $pa +gename/index.htm\n"; if ($useflock) { flock (HTML, 2) or die "can't lock html file\n"; } print HTML "<html><head><title>$head</title>\n"; ................................ ................................ ................................

    The problem is that this pages are created an accesed under:
    www.philbe.com/anyusername
    and some of them prefers, (due to commercial reasons), to have:
    www.anyusername.com
    So is mandatory to get his own server (and domain, of course).
    The easy solution is to install a copy of the script in is server...but... I don't want to let the users put his hands on the script code.
    So the other, looks like no easy, solution, is to have a "central script" in my server creating (or copying) the pages in his own servers. No matter if I need to keep a personalized copy of the script for each one.

    One of the interesting features of this sort of scripts is that the users can see the changes done on the web pages, and on the Net,(think in new "Prices", "Offers of the day" ...)in the next five seconds after the "Editions" (or the first "Creation").

    May be the answer to this problem, is this phrase:

    "Dear Philbe, learn a "little bit" more of Perl".

    Anyway thank you very much. !!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found