wget not completely processing the http call

Posted by user578458 on Stack Overflow See other posts from Stack Overflow or by user578458
Published on 2011-01-17T11:49:51Z Indexed on 2011/01/17 11:53 UTC
Read the original article Hit count: 171

Filed under:
|
|

Here is a wget command that executes a HTML / PHP stack report suite that is hosted by a third party - we don't have control over the PHP or HTML page

wget --no-check-certificate --http-user=/myacc --http-password=mypass -O /tmp/myoutput.csv "https://myserver.mydomain.com/mymodule.php?myrepcode=9999&action=exportcsv&admin=myappuserid&password=myappuserpass&startdate=2011-01-16&enddate=2011-01-16&reportby=mypreferredview"

All the elements are working perfectly:

--http-user / --http-pass as offered by a browsers standard popup for username and password prompt -O /tmp/myoutput.csv - the output file of interest

https://myserver.mydomain.com/mymodule.php?myrepcode=9999&action=exportcsv&admin=myappuserid&password=myappuserpass&startdate=2011-01-16&enddate=2011-01-16&reportby=mypreferredview"

The file generated on the fly by the parameters

myrepcode=9999 - a reference to the report in question action=exportcsv internally written in the function admin=myappuserid the third party operats SSL to access the site - then internal username and password stored in a database to access the functions of the site) password=myappuserpass startdate=2011-01-16 this and end data are parameters specific to the report 9999 enddate=2011-01-16 reportby=mypreferredview This is an option in the report that facilitates different levels of detail or aggregation

The problem is that the reportby parameter is a radio button selection in a list of 5 selections (sure I enough the default is highest level of aggregation , I want the last one which is the most detailed)

Here is a sample of the HTML page code for the options of reportby

View by The Default
My Least Preferred My Second Least Preferred My Third Least Preferred My Preferred

No matter which of the reportby items I select in the wget statement - thedefault is always executed.

Questions

1) Has anyone come across this notation in HTML (id=inputname[inputelement]) I spoke to a senior web developer and he has never seen this notation for inputs (id=inputname[inputelement]) - and w3schools do not appear familiar with this either based on an extensive search

2) Can a wget command select a none default radio item when executing the command ?

This probably will be initially received with a "Use CURL" response- however the wget approach works very well in the limited environment I am operating in - particularly as I need to download 10000 of these such items.

Thanks ahead of response

© Stack Overflow or respective owner

Related posts about html

Related posts about wget