Jump to content

GregFenton

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

GregFenton's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, I follow it fine, I'll convert it to what I need :)
  2. Here's a little background to my problem.. I have a cable modem that has a habit of dying on me, normally either overnight or whenever I leave the house (such as right now). I know the modem has a HTTP-based configuration page, and I know it uses the POST method to send the reboot command. What I wish to do is write a simple script that pings a web site (eg yahoo) every 5 minutes, and if the web site cannot be found do a HTTP POST to the cable modem with the reboot command. How can I send a HTTP POST in PHP? Please understand that I don't mean "How can I have a web page process HTTP POST in php?" Hope someone out there can help.. Greg I have looked and found how to do the same thing via telnet, however Windows XP's telnet command does not let you pipe input to it: How do we pass content to the HTTP server via standard input? Here's how to do it with telnet (If you don't use the same fname and lname values shown here, remember to adjust the Content-Length figure so that the posttest.cgi script knows how much to read in from the standard input):[code]POST /xml/crud/posttest.cgi HTTP/1.1 Host: snee.com Content-Length: 21 fname=Barry&lname=Wom[/code] The above is an example of what I would need to send.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.