Thread: [Reconnect working] Netgear Router N300 DGN2200v3
View Single Post
  #17  
Old 08.09.2012, 10:34
Freeloader
Guest
 
Posts: n/a
Default

Quote:
So even if there is a hard reboot or power loss, anyway we are getting id afresh once in step 2). What I was asking is, why do we need to a) send GET request to RST_st_poe.htm with auth, and b) parse id URL parameter with RegEx and store in var num, twice in the original script? Can't we do it only once at the start of the script, as shown above? Or is there some reason that we need to repeat these two steps before the connect also?
good morning,

Well yes there is a reason, and its because it wont work, parsing and replacing the variable(s) only happens within each step.

I tried it like 1 or 2 years ago as I thought (just like you) parsing at the beginning num should replace all of its corresponding variables %%%num%%%, but I was wrong.

You can also try it, just delete the second step where the parsing occurs. And see if it works, last time I tested this, it failed.

Take care
The Freeloader

Last edited by Freeloader; 08.09.2012 at 10:37.
Reply With Quote