Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing arguments to web page(explorer) to automate data retrieval 1

Status
Not open for further replies.

svar

Programmer
Aug 12, 2001
350
GR
I need to run a query repeatedly to get information that is available on a per request basis. For example I need to
find the id of a number of employers in a company.
In perl I can have a list with the employer names and ordinarily one would go to a url form, enter the name and get back the id. I can have the code for the form, but it is asp, not php and this only runs in explorer. So what I want to do is
foreach my $name(@list_of_names){
system ("explorer $url $name >$reply");
}
that is pass to explorer the url name as well as the input and grab the output.
This is not really a perl question, more a use of explorer
from command line. If I can do this from the command line, I can automate it.
Any ideas?
 
Hi

svar said:
I can have the code for the form, but it is asp, not php and this only runs in explorer.
Both ASP and PHP runs on the server. The browser has nothing to do with things running on the server. There is only data exchange between them.

While asked in the [tt]perl[/tt] forum, the suitable suggestion must be to code it using the [tt]LWP[/tt] module.

Feherke.
 
Thanks, but can I get an example?
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");

my $req = HTTP::Request->new(POST => '
; this has the form. If I want to get some emplyer specifically,
my $lookfor=shift;
my $res = $ua->request($lookfor);

?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top