Link to home
Start Free TrialLog in
Avatar of pootwaddle
pootwaddleFlag for United States of America

asked on

How do I find the IP address of the web server that calls my popup

We have an internal work application written in PHP that is called from another server. It acts like a popup.
Now our situation has changed where my app can be called from one of two servers.

Is there a way to find the IP address of the server that called my app?  I need to send commands back to the correct server using Curl when one of our agents presses a button on my form.

Thanks in advance!
Bryan
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pootwaddle

ASKER

There are 3 entities involved here.   My agent's PC and they are running a browser that is pointed to a URL on our dialer server.   When a call is connected, the dialer server (I believe) sends a URL ( to my agent's pc that pulls a url from our database server.

So the IP address I'm looking for is the dialer server IP.
Oh, and just to disclose, even though I don't think it is material, we are using SSH for all the connections.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your description doesn't make any sense.  What is calling the PHP application that is going to use curl?  That is the IP address you need.  And unless your database server is also a web server, nothing is "pulling a URL" from it.
Yes, sorry, our database server is a LAMP server,and it serves html pages as a popup as well as the data for the record that is to be worked on.

In the original configuration there were two servers and one client.  For the purpose here, one is an originating server and the other server serves up an html script (as a popup) with data from the record the agent is working.  The originating server is where our agents log in and initiate customer service calls.
Now there are two "originating servers" and my popup needs to know which originating
server called it so it can direct curl commands back to the correct server.

I might have to add a parameter in the url to differentiate which server made the call
for the popup.

Hope this helps clarify.

And I will also check out the information from phpinfo() to see if it gives me
what I need.

I know the two IP addresses,  I am just looking for a way that the popup can know which
of the two originating servers to send curl commands to.

Thanks!
I'll try these solutions but I believe that I may have to make some application changes to really solve this problem