• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IP & User Agent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IP & User Agent


  • Subject: Re: IP & User Agent
  • From: WebObjects <email@hidden>
  • Date: Wed, 19 Oct 2005 10:39:44 -0700

Title: Re: IP & User Agent
Eric,

Here is a snippet from a project where I needed similar info:

WORequest request = context().request();
ip_address = request.headerForKey("pc-remote-addr");
//--  “http_pc_remote_addr” alternatively

...you’ll notice that the key for the header isn’t consistent across browswers, so you’ll want to test for several formats of keys – in this case I had luck with both the “pc-remote-addr” and the “http_pc_remote_addr”.

HTH,

-Bill


on 10/19/05 10:31, Eric Stewart at email@hidden wrote:

> I need to record the IP address and User Agent of browsers that access
> a certain direct action.
>
> I did some digging and I found a reference to this:
>
> Request.headerForKey("pc_remote_addr");
>
> Unfortunately, this does not work. Can anyone point to a document that
> shows how to get the IP and User Agent from a user?
>
> Thanks,
> Eric Stewart
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >IP & User Agent (From: Eric Stewart <email@hidden>)

  • Prev by Date: IP & User Agent
  • Next by Date: Re: IP & User Agent
  • Previous by thread: IP & User Agent
  • Next by thread: Re: IP & User Agent
  • Index(es):
    • Date
    • Thread