Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-26-2006, 01:10 AM   #1
LQ Newbie
Registered: Jun 2006
Posts: 3

Rep: Reputation: 0
Question Post current IP address to .php

Okay, this is probably something not often done, but I am trying to write a simple script in order to _post my computers current ip address (rather the ip address of the network on the router) to a php script on a stable site. I do not have a static ip, I cannot acquire one, and having a dynamic ip may have its advantages. So firstly is there any function, I am in debian to note, that will give me the address I need, and is there any method or function to post something as I described. Thanks.
Old 06-26-2006, 01:31 AM   #2
LQ Newbie
Registered: Jun 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Uhm, figured it out thanks to a similar post on the forum, and also a post on another forum, have a nice day?
Old 06-26-2006, 07:53 AM   #3
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
If you have found a way to achieve this please post it. That way if someone searches on the same problem in the future they will be able to see the solution.
Old 06-27-2006, 12:37 AM   #4
LQ Newbie
Registered: Jun 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Okay, I should think things more before posting.
Using the function GetHostByName($REMOTE_ADDR); you can get the ip on the php side, given a simple measure, such as making a certian varible _get-ed to the script (by wget or possibly wput) it is possible to make a static site have a dynamically updated link to your home server... now if only those three drives did not just fry ~_~.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
echo current user with PHP genderbender Programming 1 05-10-2006 06:03 PM
Jabber/GoogleTALK/iCHAT users... post your account address here bento General 1 03-03-2006 01:37 PM
Is it safe to post a MAC address? M$ISBS Linux - Security 9 07-29-2005 08:49 AM
How can I tell my current IP address? (DCHP assigned) deanbrown3d Linux - Newbie 3 08-17-2004 03:24 PM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration