Ricardo R Bonfim
2014-05-02 14:45:46 UTC
Hello,
I have a webservice which uses Soap to interact with clients, and I
want to log which is the IP I'm receiving requests from.
In a first moment, the requests will be sent directly from client
machine, by their own implementation of soap client, and I can get
their IPs looking on $_SERVER['REMOTE_ADDR'] variable, which's fitting
perfectly at the moment.
However, I've create a client page, which implements the soap client,
for users who don't want to implement could use.
The problem is:
My page is callling the webservice by ajax, which is getting me some
trouble to find the client IP who is using the system.
The use case would look like:
1- The Client log into the system.
2- The Client access the "client page".
3- The Client click on "Begin Transaction".
4- System sends an ajax request to the server to begin the transaction.
5- System receive the ajax request, and call the soap function
(SoapClient) to begin the transaction.
6- System (SoapServer) receive the request,save the Client IP and
returns 1 for sucess.
I have the right Client IP until setp #5 using the IP stored on
$_SESSION on step #1.
I thought that I could change the IP from REMOTE_ADDR when sending the
request on step #5, but I haven't found a way to do that..
Anyone has an idea on how to solve this problem?
I have a webservice which uses Soap to interact with clients, and I
want to log which is the IP I'm receiving requests from.
In a first moment, the requests will be sent directly from client
machine, by their own implementation of soap client, and I can get
their IPs looking on $_SERVER['REMOTE_ADDR'] variable, which's fitting
perfectly at the moment.
However, I've create a client page, which implements the soap client,
for users who don't want to implement could use.
The problem is:
My page is callling the webservice by ajax, which is getting me some
trouble to find the client IP who is using the system.
The use case would look like:
1- The Client log into the system.
2- The Client access the "client page".
3- The Client click on "Begin Transaction".
4- System sends an ajax request to the server to begin the transaction.
5- System receive the ajax request, and call the soap function
(SoapClient) to begin the transaction.
6- System (SoapServer) receive the request,save the Client IP and
returns 1 for sucess.
I have the right Client IP until setp #5 using the IP stored on
$_SESSION on step #1.
I thought that I could change the IP from REMOTE_ADDR when sending the
request on step #5, but I haven't found a way to do that..
Anyone has an idea on how to solve this problem?
--
Att,
____________________________________________________
Ricardo R Bonfim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Att,
____________________________________________________
Ricardo R Bonfim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php