PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: harshilmathur on 09 November, 2010, 12:36:41

Title: Script to ping a web page on login
Post by: harshilmathur on 09 November, 2010, 12:36:41
I want a script that makes a get request to a web page (or just ping a url) whenever a registered logs in with his nick(the hub is only for registered users). That means it should open or request contents of a web page of this form:
http://somthin.com/something.php?nick=<loggedinnick>
Can someone please help, I am new to lua scripts.
Title: Re: Script to ping a web page on login
Post by: harshilmathur on 10 November, 2010, 12:34:30
No, i dont need it to parse the results or anything, i just want it to open the webpage of this format
http://myweb.com/index.php?nick=<nick>&ip=<his ip>
Just it does that much, no need to chek for result of the webpage.

Actually, I m trying to deploy dc hub in my campus, but the different hostels of campus have different NAT networks so different kinds of ips which cant be accessed from another hostel. So, I would be setting up a php page on web gateway(since m better at php programming)to forward a specific port on the gateway assigned to every user to the ip he used for logging. Thus i need the hub to send the php page he nick of user and ip of user as get request. I cant use static port forwarding since there is a dhcp server which assigns them the ip.

If there was client side method, please tell me that too.
Title: Re: Script to ping a web page on login
Post by: harshilmathur on 12 November, 2010, 19:20:42
Thanx a lot ;D. You are great.

Could you please also tell me a client side script, so that whenever he logs into my hub, he pings a web page,
http://myweb.com/index.php?nick=<his nick>&password=<his passwd>&ip=<his ip>

Thanx once again...