What are you actually trying to accomplish? Just verifying connection to the outside world or are you trying to connect and download pages for practice.
Yeah, just verifying connection. I have a customer with a property in Bahamas that wants to check the cameras remotely.The problem is the ISP there is not reliable and having to reboot the router a couple of times a day is very common there.. I'm controlling the power to the router with a PC1. The controller pings a web site and on error cuts the power to the router, waits x amount of time and checks the IP again.
If you're pinging through the master I would think a loop back through the routers or cameras dynamic dns service would work sufficiently and if you're actually connecting to a site try putting a test page on your companies website that doesn't have access through the website itself. A simple HTML page with "Test Successful!". Then you just have to make sure your website is running and not some one elses. Plus the page will never change unless you yourself change it.
Thanks Vining. The cameras are conected to a Dedicated Micros DVR.
This website returns your external IP address, this format never changes, because people need this for dynamic dns. If you do not want to setup your own website page just for this pupose. This is very easy to parse...
This website returns your external IP address, this format never changes, because people need this for dynamic dns. If you do not want to setup your own website page just for this pupose. This is very easy to parse...
I have tried connecting to both DynDNS and AMX, but I get an error when i try to connect to anything but the root of the domain (e.g. www.amx.com not www.amx.com/ip.asp). At least the DynDNS address is part of the FQDN. Any ideas how to navigate known server directory structure?
I have tried connecting to both DynDNS and AMX, but I get an error when i try to connect to anything but the root of the domain (e.g. www.amx.com not www.amx.com/ip.asp). At least the DynDNS address is part of the FQDN. Any ideas how to navigate known server directory structure?
http://www.amx.com/ip.asp is the link I just copied from my browser. It worked for me. It is just a web page. How are you trying to access it?
I Get
Line 2 :: UNKNOWN HOST: www.amx.com/ip.asp - 11:05:58
Line 3 :: ClientOpen mxInetAddr or hostGetNyName error 0x0 - 11:05:58
I made sure that my master has the correct DNS and everything.
You are asking the server to run a script. IP_CLIENT_OPEN will do that all by itself. You have to open the connection to www.amx.com without the /op.asp, then issue a GET command through that connection. A browser does this all automatically; you need to do it in the code. This is going to be true of any web service. Open the connection to the server, then send whatever is necessary for that particular server to get what you want.
Many thanks to you (and AMX) for this - I'm sick and tired of parsing showmyip.com's XML portion. Too much junk in it, and takes too long to connect. I'm definitely using this one from now on. (Watch AMX take it down now . . . blah!)
Just change the URL and file names to match the one you want to use. There are examples of other HTTP commands that you can play around with but I found no real purpose for them, not yet any way.
You'll need to use the Connect function which you can call by a button push or a timed event. Once the Connect function is called and you're connected to the server an online event will occur and trigger the GET function and with luck you'll receive data and trigger the string_event.
You can get rid of the paremeter in the connect function. That's just there so I can see what called the function in debug.
Many thanks to you (and AMX) for this - I'm sick and tired of parsing showmyip.com's XML portion. Too much junk in it, and takes too long to connect. I'm definitely using this one from now on. (Watch AMX take it down now . . . blah!)
you are welcome. That's what's cool about this forum. I've received lost of help here as well.
Comments
This website returns your external IP address, this format never changes, because people need this for dynamic dns. If you do not want to setup your own website page just for this pupose. This is very easy to parse...
http://checkip.dyndns.com:8245/
http://www.amx.com/ip.asp
I have tried connecting to both DynDNS and AMX, but I get an error when i try to connect to anything but the root of the domain (e.g. www.amx.com not www.amx.com/ip.asp). At least the DynDNS address is part of the FQDN. Any ideas how to navigate known server directory structure?
http://www.amx.com/ip.asp is the link I just copied from my browser. It worked for me. It is just a web page. How are you trying to access it?
Line 2 :: UNKNOWN HOST: www.amx.com/ip.asp - 11:05:58
Line 3 :: ClientOpen mxInetAddr or hostGetNyName error 0x0 - 11:05:58
I made sure that my master has the correct DNS and everything.
You are asking the server to run a script. IP_CLIENT_OPEN will do that all by itself. You have to open the connection to www.amx.com without the /op.asp, then issue a GET command through that connection. A browser does this all automatically; you need to do it in the code. This is going to be true of any web service. Open the connection to the server, then send whatever is necessary for that particular server to get what you want.
But I get this
Any ideas?
found it here http://www.amxforums.com/showthread.php?t=3150
Just change the URL and file names to match the one you want to use. There are examples of other HTTP commands that you can play around with but I found no real purpose for them, not yet any way.
You'll need to use the Connect function which you can call by a button push or a timed event. Once the Connect function is called and you're connected to the server an online event will occur and trigger the GET function and with luck you'll receive data and trigger the string_event.
You can get rid of the paremeter in the connect function. That's just there so I can see what called the function in debug.
you are welcome. That's what's cool about this forum. I've received lost of help here as well.
ejm