HTTP request to PHP page

I’ve installed lighttpd and php on my asus router. Then created a php script that sends a WOL.
The vera is on an other network segment so sending a WOL broadcast from the vera doesn’t work.

When I visit the page http://192.168.1.1:81/WOL.php the router sends a WOL to my pc.

When I create a scene or use the Test Luup code with the following code:

luup.inet.wget("http://192.168.1.1:81/WOL.php")

or

local http = require("socket.http")
http.TIMEOUT = 5
result, status = http.request("http://192.168.1.1:81/WOL.php ", "run=run")

and also without the body (“run=run”).

The Vera says ‘Code sent successfully.’ but my pc won’t receive the WOL package.

Is this because I use port 81 instead of 80? I’m really running low on ideas.

anyone?

I’ve been trying everything but I just can’t get this darn thing to work. I’ve been reading about curl. Could this be a solution?

Is your Vera in the same subnet as the Asus router? (Whats the IP of your Vera?)
Have your checked the lighttpd access logs to see if the page is actually being called from the Vera?

The code works fine now. I used DNS instead of IP and that doens’t work if you don’t have something like socket.dns.toip

My bad everyone I used the 192.168.1.1 in the example to make it easer to read for the forum members while I used Asus.mydomain.lan on my vera.