Emulate this POST with a script

Posted on 2006-04-06
Last Modified: 2010-04-06
BElow is the header information, as reported by Mozilla's Live Headers add-in,  that a successful POST uses to retrieve a page through a form.  I am trying to emulate this POST with a script -  Perl, PHP, Python, C# - I am trying to use Perl.  I have done this many times before to get data from web pages but cannot get this one to work.  Are there any web scraping/ spidering gurus out there who can crack this?

POST /pls/screnn/awi_report HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv: Gecko/20060111 Firefox/
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: ora_100m1.5k=6\20,21,24,25,115,30|select master_table.ticker,stock_data.EXCHANGE,stock_data.SECTOR_NAME,stock_data.X_IND,master_table.comp_name,prices.CLOSING from master_table,prices,stock_data where master_table.m_ticker=stock_data.m_ticker and master_table.m_ticker=prices.m_ticker AND upper(stock_data.MKT_VALUE) >= 100 AND upper(stock_data.VOLUME) >= 150000; TOTAL_POP=3; user_session=7a792c8b829032e1fc0d1a491b1e1927
Content-Type: application/x-www-form-urlencoded
Content-Length: 487
Question by:pjsulin
    1 Comment
    LVL 28

    Accepted Solution

    Based on the related question you posted last week, I'd say you should look at Perl's WWW::Mechanize module.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now