Maybe they are as request headers?

Try reading this:

http://php.net/apache_request_headers

And from PHP Manual:

Once the cookies have been set, they can be accessed on the next page
load with the $_COOKIE or $HTTP_COOKIE_VARS arrays. Note, superglobals
such as $_COOKIE became available in PHP ยป 4.1.0. $HTTP_COOKIE_VARS
has existed since PHP 3. Cookie values also exist in  $_REQUEST.

Hope it helps.

Alejandro.

On 4/23/07, Davor Spasoski <[EMAIL PROTECTED]> wrote:
Thank you Alejandro,

I tried listing the array $_SERVER but I cannot find the HTTP_REQUEST_COOKIE
header there. Maybe it's not even sent at all.

Davor


-----Original Message-----
From: Alejandro Guerrieri [mailto:[EMAIL PROTECTED]
Sent: Friday, April 20, 2007 5:44 PM
To: Davor Spasoski
Cc: Juan Nin; Stipe Tolj; [email protected]
Subject: Re: Getting real IP address of the handset

Davor,

Then you may try decoding the cookie. Cookie is just another header
(HTTP_REQUEST_COOKIE) and can be read from PHP using $_SERVER global
or even some specialized functions.

I'm not sure, but from what you're saying you may also have (or not)
to add a cookie from the HTTP Server in order for the proxy to append
the data.

Hope it helps,

Alejandro.

On 4/20/07, Davor Spasoski <[EMAIL PROTECTED]> wrote:
> Hi Juan,
>
> Thank you for your proposal. I tried it, but the firewall is doing
> masquerading and I can't get the real IP address.
> I was told that a proxy server called MIAP is appending some cookie
headers
> to any cookie of the HTTP server. The ip address is contained there. I
don't
> really know what they exactly mean by this and what mechanism to build to
> acquire the cookie headers.
>
> Thanks for helping
>
> Davor Spasoski
> VAS Engineering Group Leader
> Cosmofon
>
>
> -----Original Message-----
> From: Juan Nin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 19, 2007 4:09 PM
> To: Stipe Tolj
> Cc: Davor Spasoski; [email protected]
> Subject: Re: Getting real IP address of the handset
>
> Stipe Tolj wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > 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.
> >
> > Stipe
> >
> > -
> then it should appear in $_SERVER['X-WAP-NETWORK-CLIENT-IP']
>
> if not you can use print_r($_SERVER) to see all headers  :)
>
> Regards,
>
> Juan
>
>
> COSMOFON - Mobile Telecommunications Services - A.D. Skopje
> _______________________________________________________________
> This  e-mail  (including   any   attachments) is   confidential and  may
be protected  by  legal  privilege.  If  you are not the intended recipient,
you should not copy it, re-transmit it, use  it  or  disclose its contents,
but should return it to the sender  immediately  and delete  your  copy from
your system. Any unauthorized  use or dissemination of this message in whole
or in part is strictly prohibited. Please note that e-mails are susceptible
to change. COSMOFON A.D. Skopje shall not be liable  for  the improper or
incomplete transmission of the information contained in this communication
nor for any delay in its receipt or damage to your system.
>
>
>


--
Alejandro Guerrieri
Magicom
http://www.magicom-bcn.net/
LinkedIn: http://www.linkedin.com/in/aguerrieri

COSMOFON - Mobile Telecommunications Services - A.D. Skopje
_______________________________________________________________
This  e-mail  (including   any   attachments) is   confidential and  may  be 
protected  by  legal  privilege.  If  you are not the intended recipient, you 
should not copy it, re-transmit it, use  it  or  disclose its contents, but 
should return it to the sender  immediately  and delete  your  copy from your 
system. Any unauthorized  use or dissemination of this message in whole or in 
part is strictly prohibited. Please note that e-mails are susceptible  to 
change. COSMOFON A.D. Skopje shall not be liable  for  the improper or  
incomplete transmission of the information contained in this communication nor 
for any delay in its receipt or damage to your system.




--
Alejandro Guerrieri
Magicom
http://www.magicom-bcn.net/
LinkedIn: http://www.linkedin.com/in/aguerrieri

Reply via email to