Set-ddns.pl router settings list
From FreeBSDwiki
(Difference between revisions)
(→Westech WireSpeed DualConnect Home DSL Gateway) |
|||
Line 82: | Line 82: | ||
− | == Generic WAN-hosted CGI | + | == Generic WAN-hosted CGI scripts == |
+ | |||
+ | If you aren't having any luck with parsing your router's output ''or'' getting php to work on your webserver, one of these might come in handy... one is in perl and produces exactly the same output as the php version; the other is a shell script that comes close enough to fit the parser. You can place either on a CGI-enabled server at http://server.net/cgi-bin/ip.cgi or something very like it. | ||
+ | |||
+ | #!/usr/bin/perl | ||
+ | |||
+ | print "Content-type:text/html\n\n"; | ||
+ | print "<html><head><title>$ENV{REMOTE_ADDR}</title></head>\n"; | ||
+ | print "<body>Current IP Address: $ENV{REMOTE_ADDR}</body>\n"; | ||
+ | print "</html>\n"; | ||
+ | |||
− | |||
#!/bin/sh | #!/bin/sh |