Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:58:52+00:00 2026-06-15T09:58:52+00:00

I get the ip address of the user by function. e.g $ip_address = getIP();

  • 0

I get the ip address of the user by function.

e.g

$ip_address = getIP();

Now I want display current localized time and date based on a visitor’s Ip address using PHP.
if it is possible than guide me How?

Waiting for the Help and Thanks In advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:58:52+00:00Added an answer on June 15, 2026 at 9:58 am

    As pointed out in comments – this has been asked and answered

    But one answer not included is to use a Javascript callback, or store tiem offset in a cookie from Javascript (or adjust times on display).

    Example using a callback:

    • use a session in PHP (session_start, or create your own session handler)
    • either on the first page (where you don’t have dates) or send a blank holding page that sets the session and use Javascript to redirect to the real page with appending the timezone difference

    Code:

    var d = new Date()
    window.location.href = PageYouWant + '?offset=' + d.getTimezoneOffset();
    

    (Vary according to your needs)

    • then on receiving the call back, remember the offset against the session. Then send a 303 redirect to the URL without the offset in the URL and you have the data you need.

    You can do a similar thing with cookies (if you don’t have the cookie, send a holding page that creates the cookie and calls you back).

    Keep the holding page blank and no-one will notice it – just looks like the page is loading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to get the full address of user programatically using c# how can
I would like to get the address string of the current user location. Is
I want to get the user mail address, as shown in this thread :
If I want to get a user that has the email address of 'me@example.com',
Possible Duplicate: Function to get user ip address <?PHP $ipaddress = $_SERVER[REMOTE_ADDR]; echo Your
I'm working on a system that relies in $_SERVER['REMOTE_ADDR'] to get the user address
Is it possible to get the email address which the user has entered? I
Hai Guys, How to get wan ip address of my user using php....
I'm playing with facebook's javascript sdk and can't get the user email address to
I am using jQuery to get visitor's location via their IP address. There's a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.