in reply to script help (worked well on unix but NOT on winxp) newbie

Have you verified that you're sending what you think your sending? Sniff the traffic to make sure. You can also dump $req to ensure it is what you think it is.

You might also want to check out WWW::Mechanize which would do most of this for you. You seem do be doing a lot of the work the hard way.

Can you clarify what your setup is? You have this script POSTing to another CGI script. Are they running on the same server? Which one changed? Does the script still work from a unix machine? Have the module versions or the perl version changed in the process? What happens when you connect to the CGI script manually and send the same thing?

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

Replies are listed 'Best First'.
Re^2: script help (worked well on unix but NOT on winxp) newbie
by stevelake (Initiate) on Jan 30, 2006 at 17:15 UTC
    yes,Im sending the info to a form at another URL. the names are perfect and YES, it worked on UNIX based server perfect.

    this is what i get as a response content (this was copied/paste as it looks identical below(note* the bannertext on the same line): it appears to take the reclink variable but nothing else, I know the problem lies in my code not the site im retrieving.

    ********start cut***************
    Submission Error

    You did not fill out all of the fields. Please use your back button to complete the form Reciprocal=http://www.blah.com/;BannerText
    Description=
    PictureURL=
    Email=
    SiteURL=

    ********end cut***************

    here's what i get when i dump $req on the retrieved page:

    ********start cut***************

    Reciprocal=http%3A%2F%2Fwww.blah.com%2F;BannerText=blah;BannerURL=http +%3A%2F%2Fwww.blah.com%2Fbanner.gif;PictureDescription=My%20blah%20bla +h;SiteURL=http%3A%2F%2Fwww.blah.com%2F;PictureURL=http%3A%2F%2Fwww.bl +ah.com;action=SendNow;Email=webmaster%40blah.com
    ********end cut***************

    Janitored by Arunbear - added code tags around long line.

      It looks like you have a GET request URL stored in Reciprocal. I also note that URL is using ';' as a delimiter which, while appropriate and standard, causes confusion for some scripts. You might have a newer version of a module on the new box.

      <-radiant.matrix->
      A collection of thoughts and links from the minds of geeks
      The Code that can be seen is not the true Code
      I haven't found a problem yet that can't be solved by a well-placed trebuchet
        is there another way to send (post) these without cgi.pm?
        so im not clear on the last post, get in url? what do i use except the semicolon? also, maybe cgi.pm is the problem, what else can i use without installing a module without cgi.pm