what I need is some bit of code to grab the current ip address from my computer, and replace the 'source' value. I checked javascript and it didn't have what i needed. The CGI code that I found had to be run on the server, the php and perl code also appeared to be server side.
in short what i'm looking for is something like this:
<form method="post" action="https://www.wlan.wwu.edu/login.pl" enctype="application/x-www-form-urlencoded" name="bluesocket_u" class="nospace">
<input name="_FORM_SUBMIT" value="1" type="hidden">
<input name="which_form" value="reg" type="hidden">
<input name="destination" value="http://www.google.com/?" type="hidden">
<------ some code here that will grab the ip address of my wifi card then print it out formated like this; ----->
<input name="source" value="xxx.xxx.xxx.xxx" type="hidden">
<input name="error" value="" type="hidden">
....
Thanks for any help you guys can give me!
Art
Last edited by nouse4anick on Thu Mar 08, 2007 1:20 pm, edited 1 time in total.
Everah wrote:Is that even possible? And you want this to be done in a browser?
should be, it should be able to be done with any inline scripting language.
the only other option is to code the output of the post by hand and make a c or python program that gets the ip addy, inserts it, and then transmits it. but why do that when most of it is done for me in the browser?
mikeq wrote:So you are saying that it can be done, but you dont know how to do it.
Well if you dont know how to do it, how on earth are you so confident that it can be done?
Considering python, c, java, php, and perl all have functions to return ip addresses, I'm pretty sure what I'm asking for is not impossible. What I am unsure of is how to embed one of those functions into a html file for client side execution.
Now, it might be easier to do a bit of fancy coding and send the data from the post to the intended site addy, in which case any sites that have such info is always welcome. But I'll take just about anything I can get right now.
Us knowing what you want to do may help us determine if there are any other ways of accomplishing the same task.
The above markup is basically ripped from a login page for my school's wifi network. What I want to have happen is when my laptop gets it's ip addy from the network at school, it automatically sends the the post message with the current ip addy to log me in to the network.
I see 3 ways to accomplish this: write a small program that outputs the html page with the code and execute the file (open it in fire fox), write client side code in the html file to grab and print the ip address, or write a program that builds the string and sends it to the address...
So thats what I'm trying to do. If anyone has a webpage for making the output string of the post option and sending it please post it, or on how to grab the ip addy client side, please post it.