473,785 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Obtaining IP adress of browser host ?

Hi All

I have a page where I trigger a command like xterm.

<?

$cmd="export DISPLAY=$disp ; xterm";

$out=shell_exec ($cmd);

?>

In php, can I find out what the hostname is where the browser is running
that requested this page so I can set the DISPLAY variable for that X-Server
?

I don't want to have the user to specifiy this.

Thanks in advance
Heinz
Jul 17 '05 #1
2 3128
In article <bk************ @ID-25174.news.uni-berlin.de>,
"Heinz" <lu*********@ya hoo.com> wrote:
In php, can I find out what the hostname is where the browser is running


gethostbyaddr($ _SERVER[REMOTE_ADDR]);

hth

--
Bulworth : fu***@fung.arg | My email address is ROT13 encoded, decode to mail
--------------------------|--------------------------------------------------
<http://www.phplabs.com/> | PHP scripts and thousands of webmaster resources!
Jul 17 '05 #2

"Senator Jay Billington Bulworth" <fu***@fung.arg > wrote in message
news:fu******** *************** **@clmboh1-nws4-ge0.columbus.rr .com...
In article <bk************ @ID-25174.news.uni-berlin.de>,
"Heinz" <lu*********@ya hoo.com> wrote:
In php, can I find out what the hostname is where the browser is running


gethostbyaddr($ _SERVER[REMOTE_ADDR]);

hth

Many thanks !!!!
it works now :-)

Cheers
Heinz
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4843
by: KS | last post by:
Is it possible to get a client browser ip-adress when it access my webpage? If the client is behind a network from a company can I get the ipadress gateway where the client is behind or is it i only possible to get the client ipadress? I want to somehow deny everyone except the one with the correct ip-adress/range.
7
21317
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of someone (client) that visits a web site through an anonymous proxy if this person ONLY has JavaScript enabled in their browser? This is NOT a question about PHP, perl, VBScript, Java(.class), or ActiveX. Let us _only_ deal with JavaScript for...
0
1780
by: Marc Bogaard | last post by:
Hello all! I am trying to develop some kind of proxy which filters the data the browser sents to a webserver (www.google.de, www.gmx.net, ...). For this reason I set a Proxy Connection in my IE 6.0 Settings at port 8000 (e.g) and the server to localhost (the proxy that runs local). Now I use the TCPListener which listens and recieves data after I typed in and pressed the send button from the browser. After this I take the data and send...
2
6778
by: Sven Wynsberghe | last post by:
Like the topic states, is there any way I can get the ip-adress of my computer with a vb.net application? thanks for the help :)
2
2408
by: amirmira | last post by:
Hi, I have an application where I monitor the status of a machine using it's IP address. I would like to log an error when the machine goes down - but I want to add the name of the machine along with the IP address in the log. Any ideas how to achieve this? I have seen several examples of obtaining the IP address given the host name using the dns.gethostbyname function but have not seen anything that will work the other way. Thanks in...
3
1324
by: Steve | last post by:
I need to obtain the filesize of a file thats not on the same server. As filesize() need a realpath and not a url how else can this be done?
3
11934
by: Maksim Kasimov | last post by:
Hi, how to set source ip-address when do __socket.connect((host, port)) on a machine that have a several ip-adresses? many thanks for advice. __socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) __socket.connect((host, port))
8
1742
by: Daz | last post by:
Hi everyone. I just wanted to know if there was any way to use script to display a list of methods linked to a particular object? The object I have in mind is getBrowser(), and I can't seem to find any documentation online with regards to it's methods. Also, as I am learning, it would be nice to be able to know what methods are available for a particular object/function, without necessarily having to spend a while looking up an...
7
2773
by: =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post by:
Hello, Please read this all before giving an answer :) I'm doing some troubleshooting on a web application that my company wrote. It's written in asp.net 1.1. The error that the Event viewer gives is: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
0
9484
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7505
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.