On 04/05/12 15:52, loc wrote: > I can't seem to get wget --post-data to work with any site, I've tried > a few more and none work. > > Below is one I'm trying as a test and if I load the page in Firefox > and just put "test" in for the > First Name field a new page is loaded which says: > > "An Error Has Occured > You must fill in the field Last Name" > > Now if I try to load this with wget, it just downloads the page with > the form it doesn't seem > to be posting the data. > > wget > --post-data='fFirstName=test&fLastName=&fJobTitle=&fCompanyName=&fAddress1= > &fAddress2=&fCity=&fState=&fZip=&fCountry=&fPhone=&fFax=&fEmail=&fIAmAn=&fUseEDG > E=&fHaveEDGE=%28Not+Selected%29&fWhyHere=&fOS=&fComments=&BtnDownload=Download+D > emo+Now' \ > http://www.microlite.com/downloads/index.html You should post to http://www.microlite.com/cgi-bin/submit.cgi, not to index.html
And you obviously need to provide all the fields the cgi requires, such as: > wget > --post-data='fFirstName=test&fLastName=test2&fJobTitle=&fCompanyName=test+Co&fAddress1=test+address&fAddress2=&fCity=test+city&fState=test+state&fZip=test+zip&fCountry=test+country&fPhone=test+phone&fFax=&fEmail=test+email&fIAmAn=personal&fUseEDGE=&fHaveEDGE=%28Not+Selected%29&fWhyHere=&fOS=edgelx64&fComments=&BtnDownload=Download+Demo+Now' > http://www.microlite.com/cgi-bin/submit.cgi
