Hi Davor,

Davor Spasoski wrote:

I started testing the WAP gateway. My problem is that I cannot get the IP
address of the mobile handset by invoking any of the following http headers:

$_SERVER["HTTP_CLIENT_IP"]

$_SERVER["REMOTE_ADDR"];

ok, these are obviously PHP code segments you use here ;)

I always get back the IP address of the machine where the Kannel is running.
Is there any setting on kannel to solve this problem?

as you try to get the client IP of the mobile that is accessing your HTTP
server, you will see for REMOTE_ADDR of course the IP of the machine running
Kannel.

What you need is to look for a specific HTTP header that is used by Kannel to
proxy the mobile client IP to the application layer.

This is HTTP header: X-WAP-Network-Client-IP

I don't recall it now, otherwise I would tell, but you simply need to figure out in PHP how to obtain the HTTP header with the above name while the requests is
processed, then you get the client IP.

this looks like it:

http://au3.php.net/manual/en/function.http-get-request-headers.php

but it's a pecl module ...

cheers

iain

Reply via email to