texuser74 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Experts,

I want to download the webpage of an url after executing the query string attached to that, e.g.
http://www.ugc.ac.in/inside/prof_search.php?resultpage=1&search=%

how can i do this?

I tried the following command, but the saved file contains only a partial information
system("lwp-download http://www.ugc.ac.in/inside/prof_search.php?resultpage=3&search=%");

please help

Replies are listed 'Best First'.
Re: download url
by davido (Cardinal) on Sep 01, 2004 at 08:11 UTC

    This seems to fetch a complete page, minus graphic images.

    perl -e"use LWP::Simple;print get('http://www.ugc.ac.in/inside/p rof_search.php?resultpage=1&search=%')" >page.html

    Is that what you're after?


    Dave

      Mh... why not:

      perl -MLWP::Simple -e "mirror('http://www.ugc.ac.in/inside/prof_search.php?resultpage=1&search=%','page.html')"

      Golf time? :-)

      Ciao!
      --bronto


      The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
      --John M. Dlugosz
      Yes, Thank you very much