Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Geo-location in CPANEL

Discussion in 'General Discussion' started by galauniver, Mar 26, 2009.

  1. galauniver

    galauniver Registered

    Joined:
    Mar 26, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    CPanel knows about IP addresses location of accessed user.

    Is it possible using some API for example PHP to get Coutry Code of a users.

    Thank you
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you're talking about cPanel users, you could have a script that processes /usr/local/cpanel/logs/access_log for accounts and IPs and run those IPs through a IP to Geo location script or module to produce the information you need.
     
  3. galauniver

    galauniver Registered

    Joined:
    Mar 26, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thank you David,

    But my question not about CPanel users.

    It's about user's location who access my pages, and I want to generate different content on a page according to their location.
    Is it possible programaticaly in run time to find out country code. This statistic information avaliable in CPanle
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice