Jump to content

ajetrumpet

Members
  • Posts

    195
  • Joined

  • Last visited

Posts posted by ajetrumpet

  1. 6 hours ago, requinix said:

    You have to know something about where your user lives. With only PHP you can use geolocation on their IP address to get a good approximation. With Javascript you can get their "timezone" (UTC offset) with the Date object, which does not tell you their location.

    no no, I'm not interested in capturing THEIR time, I want to store my own!  central daylight time, Chicago IL time

    Berand,

    the time is stored in the DB the same way it is listed on the report.

  2. I have this:

        $sql = mysqli_query($conn, "SELECT ip
                                         , page
                                         , CASE WHEN referrer = ''
                                                THEN 'N/A'
                                                ELSE referrer
                                           END as referrer     
                                         , DATE_FORMAT(date, '%m/%d/%y') as date
                                         , TIME_FORMAT(time, '%T') as time
                                    FROM tblTraffic 
                                    ORDER BY date DESC, time DESC");

    most of my traffic report contains the correct times, my time, which is CST in the USA.  but some records are off by a lot.  Does the time() function capture the time of the actual location from which the visitor is coming from?  if so, what could I do to return my timezone for any visitor?  w3 schools and php.net don't mention this.

  3. actually no i didn't.  i wasn't hired for PHP.  nor was i hired for web application work.  but microsoft technologies suck, so he asked me what was available in the open source world.  small business people don't have a ton of money to spend while they are in the early stages of business, thus he asked if I would learn it to produce some small projects.  and now I will develop a mobile app for the same guy.  that will be a huge undertaking.  i'm really not looking forward to it.

  4. lol, nice!  you have yet to attract ONE customer!?  you've never sold anything?  i don't even have a website and i've done plenty of individual contracts!  and you mite as well contact them.  they have records for just about everything imaginable.

  5. he's not doing it for that purpose Barand.  you should know, u gave me the correct script!  he wants to know where his visitors are coming from.  i regularly check that report and there are plenty of visits from google's cloud, google's bots, ms's bots and us cellular's company as well, which is our cell phone carrier.

  6. ???  why do you say that?  my words indicate nothing of the sort.  they want it as easy as possible.  don't most small business people?  they don't have time to figure that crap out, nor do they care to.

  7. this is interesting...facebook shows that my geo location is 2 hours away from me!  i'm on a wifi hotspot on my phone and my carrier is us cellular, so this too proves that this whole geo thing is not at all reliable.

     

     

    wrong geo.png

  8. i found the following code here: https://stackoverflow.com/questions/409999/getting-the-location-from-an-ip-address

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script>
    contry_code = google.loader.ClientLocation.address.country_code
    city = google.loader.ClientLocation.address.city
    region = google.loader.ClientLocation.address.region
    </script>

    will this work to get location info?

  9. is this:

    Quote

    "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"

    this geolocation library that google offers?  it doesn't look like it.  when godaddy failed me on the geolocation extension implementation I google the issue and found some HTML code that uses the free google apis for that purpose.

  10. no I'm not doing this, but I rarely work with other people.  I am the sole developer for this small business.  but i will keep that in mind.  when you work for entrepreneurs a lot of times the "traditionality" and coding standards sometimes get missed cuz the business owners don't really understand the tech that their using.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.