Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: capturing dynamic page

by cliffrubinmusic (Novice)
on May 10, 2012 at 11:23 UTC ( [id://969792]=note: print w/replies, xml ) Need Help??


in reply to Re^3: capturing dynamic page
in thread capturing dynamic page

thank you..I read the section on file handles..from what I can see, it still needs a name. please show me if I've missed something

Sorry..you are right. It's http://website.com/cgi-bin/myscript.pl

The problem remains the same..using Get(http://website.com/myscript.pl) out of lwp does not get me the results I am after. No matter what page shows up in the browser, it says http://mywebsite.com/cgi-bin/myscript.pl

the field forms are consistently parsed by cgi.pm, so, I'm thinking the entire page must be being parsed to get at the form tags. Does cgi.pm have a variable that is already holding the entire page I can call,use and manipulate?

I have read through the docs you've recommended, and, again, I'm sure I'm missing something rather simple, but, I'm just not seeing it.

$query=new CGI;

@names=$query->param;

gives me an array of all the parameters

is there a function call to give me the entire page? if not, is there another way to get the entire page, when the address for every page is the same? thank you

Replies are listed 'Best First'.
Re^5: capturing dynamic page
by Anonymous Monk on May 10, 2012 at 14:12 UTC

    Hi, different Anonymous monk here. (Either that, or I have a multiple personality disorder. I wouldn't count that out.)

    No matter what page shows up in the browser, it says http://mywebsite.com/cgi-bin/myscript.pl

    Your form is being submitted to myscript.pl in that address via the HTTP POST method. The method usually requires key-value pairs for the query part. You should be searching what the required key-value pairs (well, not strictly pairs) are (the name and value attributes in the form you are submitting), and then read the LWP documentation on how to make a POST request with the pairs.

    The result of that POST request will be the HTTP response that contains the HTML page.

      So, are you saying that one of the name, value pairs holds the entire source code of the web page?

      I thought the name, value pairs were only inside the form, not the formatting or any of the other tags and commands inside the web page. I'm looking to get the whole enchilada like I could with get() in LWP, but through whatever pipe might be feeding the page to cgi.pm

      please enlighten me

        You don't need the entire source of the web page to be included in the POST request. Your script generated the page, or linked to a static page. If your script did that, your script already has access to the page without asking for it to be passed back from the client-side.

        Instead of telling us what you need, why don't you tell us what it is that you're doing. If you simply repeat back that you need the source of the page again, I give up. But if you can explain what you're doing to generate the page, and what you are trying to accomplish, we may have a chance of helping.

        If you really need to know the page's source, you're going to have to keep track of it yourself.


        Dave

        Honestly, just install a browser extension such as Live HTTP Headers, or a stand-alone program such as tcpdump/WireShark, make a few HTTP requests, and figure out how HTTP works.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-26 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found