There is a site that spits out a text file that is created using a CGI program and displayed on a web page... I'm trying to use the get method by going:
$html = get("http://foldtraj.mshri.on.ca/cgi-bin/conform/foldtraj?nums
+truc=1&KinemageReader=63&filein=.%2Fdata%2F9_Joey2.trj&save=See&dopt=
+r&keepfilein=1&numlock=0");
open (FILE, ">tempdata.dat") or die "could not open this data file";
print FILE $html;
close FILE;
.. and then saving the html that I get in a file so that I can manipulate that file.
When I do that, it says that I have an invalid user, since from where I'm running the perl script I don't have the correct cookie information that is needed.
When that address is put directly into a browser, it runs correctly and the text file desired is displayed, since I'm on their site and their cookie is already in my browser...
Is there anyway to have this work by having a cookie of my own or some other way?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.