![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MPAA Sets Up Fake Site to Catch Pirates - Slashdot | iBot | UNIX and Linux RSS News | 0 | 07-07-2007 08:10 PM |
| system Fake IPs | ppass | SUN Solaris | 2 | 04-26-2005 12:33 PM |
| Static | wojtyla | High Level Programming | 6 | 02-25-2005 11:57 AM |
| Fake System32 Folder | Kimm | Linux | 2 | 08-23-2004 10:25 AM |
| Static IP | IP Networking | 7 | 05-18-2003 07:33 PM | |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
I'm working on a script that runs on remote hosts and sends their dynamic IP address' to a server (which of course has statics).
All the client computers run linux (as does the server). basically... the idea was: 1) Host a webpage on the server with a php script that displays only the IP address of the client. I accomplished this with code: <?php echo $_SERVER['REMOTE_ADDR']; ?> 2) run a script (in a cron job) that queries the the server for its current IP, then checks it against the the last known IP. If its changed, it sends the updated IP address to the server. (the use the lynx domain.com/ip --dump command to get my public IP) -- So... I have two questions. (maybe more)... 1) What do you guys think the best solution is to get the IP and hostname back to the server? I have shell access to all computers, so I thought scp at first... but a few of the computers have users I don't necessarily trust, so I really didn't want to use scp in a script... 2) I also would like to make a url forward to that computer... How can I for example: "ssh user@domain.com/remote1" and have the php script (or any kind of script) redirect (...route) me to the remote hosts IP? This is something I've been working on for a while... I realize it may not be the most elegant approach, but its what I came up with after much, much deliberation. So any Ideas... experinces... advise will be greatly appreciated! Btw, This might be the first time I've ever posted an actual question about linux or anything for that matter. I can always find the answers I need by searching and reading... even if it takes weeks to figure out one little thing. So I wouldn't ask If I felt I could just google it and find the answers. Last edited by heith; 02-22-2007 at 02:01 AM.. Reason: add icon so I would draw your attention :) |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|