Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread info
Hello Michael,

please go to your Bash-Shell. There you type:
MYIP=`/sbin/ifconfig ppp0 grep inet | cut -d: -f2 | cut -d  -f1` ;

$MYIP has now your dyn IP Adress.

Best regards,
Oliver Etzel
---
[EMAIL PROTECTED]
Phone +49 89 54071102
New - .eu-Domains
Scriptinstallation Serverconfiguration Hosting Serverhousing Domains
www.t-host.de
---

 Does anyone know a way to fetch your own IP-adress? I need it because I run
 a web server on my computer with a dynamic-IP so I need it to change all the
 URLs it creates dynamically...



Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread info
Oh man,

Then you write a short script, that whenever IP changes then start it anew.
You don´t have to make it public.


  - Original Message - 
  From: Chris Hewitt 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, January 07, 2003 1:20 PM
  Subject: Re: [PHP] Get your *own* IP...?!


  [EMAIL PROTECTED] wrote:

  $MYIP has now your dyn IP Adress.
  
  Yes. So make up  a URL with it and _hope_ that when a user clicks it the 
  address has not changed.

  My point was simply that, for a server, the server FQDN hostname should 
  be fixed and never change.  Use the hostname in any URL and avoid the IP 
  address problem completely.

  Regards

  Chris


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread Jason Wong
On Tuesday 07 January 2003 20:28, [EMAIL PROTECTED] wrote:

 Then you write a short script, that whenever IP changes then start it anew.
 You don´t have to make it public.

Right, so what if people like your site so much and they bookmark a particular 
page?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
 EARTH  
 smog  |   bricks  
 AIR  --  mud  --  FIRE
soda water |   tequila 
 WATER
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread Tom Rogers
Hi,

Tuesday, January 7, 2003, 6:45:43 AM, you wrote:
ClP Does anyone know a way to fetch your own IP-adress? I need it because I run
ClP a web server on my computer with a dynamic-IP so I need it to change all the
ClP URLs it creates dynamically...

ClP Thanks!

ClP -Charles

I think you should take a look at this :))

http://www.dyndns.org/

-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread Chris Hewitt
Charles likes PHP wrote:


Does anyone know a way to fetch your own IP-adress? I need it because I run
a web server on my computer with a dynamic-IP so I need it to change all the
URLs it creates dynamically...


Maybe I'm not understanding your situation properly so please correct me 
if I'm wrong. URLs should have the FQDN not IP address. DNS was created 
so that fixed, easy to remember, names could be given to computers not 
numbers. The numbers (IP address)  may change.

If you are running a server, its hostname should be fixed, e.g. 
mybox.myisp.com whilst its ip address may change.

I suggest that you use $_SERVER['SERVER_NAME'] in the URL. Its populated 
with Apache under linux, but whatever you are using you should have a 
way to get the hostname. Best if you are running a server is to get a 
static ip address from your isp but few will have them these days (I'm 
on a static IP address from Demon Internet). As long as your  hostname 
remains the same you will have little problem. Your isp should provide 
forward DNS for your hostname (they should provide reverse too). Maybe 
for dns you may need something like dyndns.org.

Some broadband ISPs use hostnames based upon the IP address e.g. 
dsl-111.222.333.444.myisp.com. It saves them playing with DNS and are 
intended for end users (who would usually have no problem with it as 
they would not be trying to run a server).

Hope this helps.

Chris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread info
Hello all,
Oh my god
As a perl hacker I did it that easy way: 

Please go to your Linux Bash-Shell. There you type:

MYIP=`/sbin/ifconfig ppp0 grep inet | cut -d: -f2 | cut -d  -f1` ;

$MYIP has now your dyn IP Adress.

Best regards,
Oliver Etzel
---
[EMAIL PROTECTED]
Phone +49 89 54071102
New - .eu-Domains
Scriptinstallation Serverconfiguration Hosting Serverhousing Domains
www.t-host.de
---
  - Original Message - 
  From: Chris Hewitt 
  To: Charles likes PHP 
  Cc: [EMAIL PROTECTED] 
  Sent: Tuesday, January 07, 2003 12:22 PM
  Subject: Re: [PHP] Get your *own* IP...?!


  Charles likes PHP wrote:

  Does anyone know a way to fetch your own IP-adress? I need it because I run
  a web server on my computer with a dynamic-IP so I need it to change all the
  URLs it creates dynamically...
  
  Maybe I'm not understanding your situation properly so please correct me 
  if I'm wrong. URLs should have the FQDN not IP address. DNS was created 
  so that fixed, easy to remember, names could be given to computers not 
  numbers. The numbers (IP address)  may change.

  If you are running a server, its hostname should be fixed, e.g. 
  mybox.myisp.com whilst its ip address may change.

  I suggest that you use $_SERVER['SERVER_NAME'] in the URL. Its populated 
  with Apache under linux, but whatever you are using you should have a 
  way to get the hostname. Best if you are running a server is to get a 
  static ip address from your isp but few will have them these days (I'm 
  on a static IP address from Demon Internet). As long as your  hostname 
  remains the same you will have little problem. Your isp should provide 
  forward DNS for your hostname (they should provide reverse too). Maybe 
  for dns you may need something like dyndns.org.

  Some broadband ISPs use hostnames based upon the IP address e.g. 
  dsl-111.222.333.444.myisp.com. It saves them playing with DNS and are 
  intended for end users (who would usually have no problem with it as 
  they would not be trying to run a server).

  Hope this helps.

  Chris



  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-07 Thread Chris Hewitt
[EMAIL PROTECTED] wrote:


$MYIP has now your dyn IP Adress.


Yes. So make up  a URL with it and _hope_ that when a user clicks it the 
address has not changed.

My point was simply that, for a server, the server FQDN hostname should 
be fixed and never change.  Use the hostname in any URL and avoid the IP 
address problem completely.

Regards

Chris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Get your *own* IP...?!

2003-01-06 Thread Charles likes PHP
Does anyone know a way to fetch your own IP-adress? I need it because I run
a web server on my computer with a dynamic-IP so I need it to change all the
URLs it creates dynamically...

Thanks!

-Charles



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] Get your *own* IP...?!

2003-01-06 Thread Kevin Stone
In Apache it's $_SERVER['SERVER_ADDR']  But I don't know if this applies to
IIS as well.
-Kevin


- Original Message -
From: Charles likes PHP [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 1:45 PM
Subject: [PHP] Get your *own* IP...?!


 Does anyone know a way to fetch your own IP-adress? I need it because I
run
 a web server on my computer with a dynamic-IP so I need it to change all
the
 URLs it creates dynamically...

 Thanks!

 -Charles



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-06 Thread Tracy Finifter Rotton
Use the super-global variable $_SERVER['SERVER_ADDR']

(or another solution might be to generate relative, rather than absolute,
URLs:  /somedir/somepage.php instead of
http://192.168.1.1/somedir/somepage.php)

On 1/6/03 12:45 PM, Charles likes PHP [EMAIL PROTECTED] wrote:

 Does anyone know a way to fetch your own IP-adress? I need it because I run
 a web server on my computer with a dynamic-IP so I need it to change all the
 URLs it creates dynamically...
 
 Thanks!
 
 -Charles
 
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-06 Thread Michael Ott
Hallo Charles

 Does anyone know a way to fetch your own IP-adress? I need it because I run
 a web server on my computer with a dynamic-IP so I need it to change all the
 URLs it creates dynamically...
 
Look at dyndns.org. Here you can get your own dns-entry

CU
   
  Michael  .--.
  |o_o | 
--||_/ |
  /-\//   \ \
  |  Michael Ott, Glockenhofstr. 29a, 90478 Nuernberg   |   (| | )
  | e-mail: [EMAIL PROTECTED], Tel. +49 9 11 41 88 576 |  /'\_   _/`\
  \-/  \___)=(___/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php