Ok, I used Firebug to record that requests going to the server, and what comes back.

Here is the stuff from FireBug:
Headers

Post

Response

So I wrote this code to try and do the same kind of request:
#!/usr/bin/perl use LWP::UserAgent; my $ua = new LWP::UserAgent; my $string = <<END; <?xml version="1.0" encoding="UTF-8" ?><ARCXML version="1.1"> <REQUEST> <GET_FEATURES outputmode="xml" envelope="true" geometry="false" featur +elimit="1000" beginrecord="1"> <LAYER id="6" /><SPATIALQUERY subfields="CCNO CRIME_DESC FROM_DATE PRE +M_DESC LOCATION POST DISTRICT" where="(FROM_DATE &gt;&#061; {ts '2009-01-01 00:00:00'}) AND (FROM_DA +TE &lt;&#061; {ts '2009-01-06 23 :59:59'})"> "><SPATIALFILTER relation="area_intersection" ><POLYGON> <RING> <POINT x="1427074.01374657" y="596810.020728368" /> <POINT x="1429830.95443664" y="596810.020728368" /> <POINT x="1429830.95443664" y="592945.463874963" /> <POINT x="1427074.01374657" y="592945.463874963" /> </RING> </POLYGON> </SPATIALFILTER></SPATIALQUERY></GET_FEATURES></REQUEST></ARCXML> END my $server = <<SERVER; http://maps.baltimorepolice.org/servlet/com.esri.esrimap.Esrimap?Servi +ceName=BaltimorePolice&ClientVersion=3.1&Form=True&Encode=False SERVER my $response = $ua->post("$server", { ArcXMLRequest => "$string", FormCharset => 'ISO-8859-1', BgColor => '#000000', JavaScriptFunction +=> 'parent.MapFrame.processXML', FooterFile => '', HeaderFile => '', RedirectURL => '' }); if ($response->is_success) { print $response->content; # or whatever } else { die $response->status_line; }


However, instead of getting the response like in Firebug (which is exactly what I want), I'm getting this:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1 +"><HTML><HEAD><TITLE>Default Form</TITLE><!-- Title must match jsForm +.htm's title --><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> +function passXML() { var XMLResponse='<?xml version="1.0" encoding="UTF-8"?><ARCXML versio +n="1.1"><RESPONSE><ERROR machine="BPDMAP1" processid="2008" threadid= +"2748">Not a correct ArcXML request.</ERROR></RESPONSE></ARCXML>'; parent.MapFrame.processXML(XMLResponse); }</SCRIPT></HEAD><BODY BGCOLOR="#000000" onload="passXML()"><FORM ACTI +ON="" METHOD="POST" name="theForm"><!--- <input type="Hidden" name="F +orm" value="True"> ---><INPUT TYPE="Hidden" NAME="ArcXMLRequest" VALU +E=""><INPUT TYPE="Hidden" NAME="JavaScriptFunction" VALUE="parent.Map +Frame.processXML"><INPUT TYPE="Hidden" NAME="BgColor" VALUE="#000000" +><INPUT TYPE="Hidden" NAME="FormCharset" VALUE="ISO-8859-1"><INPUT TY +PE="Hidden" NAME="RedirectURL" VALUE=""><INPUT TYPE="Hidden" NAME="He +aderFile" VALUE=""><INPUT TYPE="Hidden" NAME="FooterFile" VALUE=""></ +FORM></BODY></HTML>


Any ideas?

In reply to Re^2: Scraping from ArcIMS Map by Tomcat7194
in thread [SOLVED] Scraping from ArcIMS Map by Tomcat7194

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.