I need to start from PHP page (my “external” website),
call my agent code (hidden url)
then post a message (x=1) but the document.url & location.reload() is still my external website
Is there a sort of cross-site restriction ?
I am not able to read any post message from the PHP
What have I missed ?
Entry Page PHP
`
`
Agent Code
`
function loadPage(res) {
local html = “"
+“SEND”
+""
res.send(200, html);
}
http.onrequest(function(request,res) {
server.log("Request: " + request.body);
local data = http.urldecode(request.body);
if (request.body == “”) { loadPage(res); }
else if (“x” in data) { ; loadPage(res); }
});
`
THANK YOU