Public ip address
Andre Garzia
soapdog at mac.com
Mon Jul 26 18:14:31 EDT 2004
Roger,
Let's end this! here a little CGI for you... :-p you must setup
Metacard Engine as CGI. You can refer to the CGI tutorial at
http://www.hyperactivesw.com/cgitutorial/ or use my CGI-Tool palette to
do this for you, you can fetch it on http://public.soapdog.org
put this inside a cgi called whatismyip.cgi
--- Begin whatismyip.cgi --
#!mc
on startup
put "Content-Type: text/plain" & cr & cr
put "Your ip is:" && $REMOTE_ADDR
end startup
--- end whatismyip.cgi --
you invoke this by http://www.yourServer.com/cgi-bin/whatismyip.cgi
you can use the following code in your client app:
function whatIsMyDamnIP
get URL "http://www.yourServer.com/cgi-bin/whatismyip.cgi"
set the itemDel to ":"
put item 2 of it into tMyIP
return tMyIP
end whatIsMyDamnIP
that should work.
andre
On Jul 26, 2004, at 6:59 PM, Roger Amar wrote:
> OK, Andre, I agree with you, I used the wrong solution because I could
> not find better.
> If you can help with a more efficient solution, I would be happy.
> Thanks in advance.
>
> Roger;
>
>
> -----Message d'origine-----
> DeÊ: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] De la part de Andre
> Garzia
> EnvoyÊ: lundi 26 juillet 2004 23:09
> ËÊ: How to use Revolution
> ObjetÊ: Re: Public ip address
>
>
> On Jul 26, 2004, at 5:42 PM, Roger Amar wrote:
>
>> Owing to the fact that our customers use routers, in more from various
>> manufacturers and that they are working on different platforms (MacOS
>> 9, MacOS X and Windows), the only simple and reliable solution that I
>> found at this time is to import the Web page of whatismyip.com and to
>> extract the IP address.
>
> Roger,
>
> I can give you a five lines CGI and a parse routine for your script if
> you want... just don't use www.whatismyip.com please! their homepage
> can go offline and then what, your app is rendered useless. If you
> going to make a CGI connection to probe for IP, let it be hosted by
> you. It's more elegant, safe and error proof. there are tons of people
> here that can send you this code, it's pretty easy. Just don't relly
> on third-party home pages, if they go offline, change design, or
> timeout, you'll be a sitting duck...
>
> andre
>
>
>
>
> --
> Andre Alves Garzia ð 2004
> Soap Dog Studios - BRAZIL
> http://studio.soapdog.org
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org
More information about the use-livecode
mailing list