• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WGET command not working

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a website that I need to go to often and disable a monitor. To disable I need to login to the website-> click on monitor -> then uncheck a box.

I am told that I can do this through a scipt using the WGET command. I got the parameterized query and then tried to execute it through a *.sh script.

The script generates a php file in the location from where it is executed. When I go to the site and check the monitor is not disabled.

Could someone please advise on this. Thanks
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like wget is working fine. The default behavior of wget is to retrieve a URL. What you want to do is post the form that has the checkbox on it. A quick glance at the wget manual and it looks like you should use the --post-data or --post-file options to send data to your monitor.
 
farooq kadri
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read the manual but could not make much out of it. I tried the below:

wget --save-cookies cookies.txt \
--post-data VAR= 'https://siteuptime.com/api/rest/?method=siteuptime.auth&Email=email.com&Password=passwd'\
http://siteuptime.com

#wget --load-cookies cookies.txt \
# --p https://siteuptime.com/api/rest/?method=siteuptime.disablemonitor&AuthKey=$VAR&MonitorId=9294


But it dint seem to work. I am trying to post a command in the URL in combination with the WGET command. The command would disable/enable the monitors.

The API documentation for the command that I am trying to use is at : http://siteuptime.com/api.php
 
reply
    Bookmark Topic Watch Topic
  • New Topic