Get IP address for form.
Posted: Wed Mar 07, 2007 4:23 pm
Here is what I have in a web page on my computer:
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:
Thanks for any help you guys can give me!
Art

Code: Select all
<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">
<input name="source" value="140.160.131.111" type="hidden">
<input name="error" value="" type="hidden">
.........
in short what i'm looking for is something like this:
Code: Select all
<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">
....
Art