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

  • Home
  • SEARCH
  • 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 833967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:36:12+00:00 2026-05-15T04:36:12+00:00

I’m trying to prevent some basic click-fraud on my site, and am building links

  • 0

I’m trying to prevent some basic click-fraud on my site, and am building links based on session time data.

Everything works in FF, but in IE the information I’m storing in the session is somehow being changed.

When I load up the main page, I set my session variables like this

session_start();
$_SESSION['time']=time();

I’m out putting the session value into the page, so I get something like
1275512393.

When the user clicks on a link, I send an ajax request, and that page is returning the session which I am putting into an alert.

session_start();
echo $_SESSION['time'];
die();

The alert is returning
1275512422.

Only in IE is the $_SESSION[‘time’] being returned different from the original $_SESSION[‘time’]

It doesn’t appear that this is a caching issue, as the times are always VERY near each other, and the second one is always after the first, but I’m not positive.

——–update – issue caused by facebook javascript . no solution yet ————–

As i was stripping out code to post as recommended per MANCHUCK, I started to wonder if this bit of Facebook code was somehow causing the problem

FB.ini({appId: ‘myappid’, status: true, cookie: true, xfbml: true });

so I stripped that out and ran the page again, and now the $_SESSION times matched!!

So I found the problem.
I thought maybe somehow that FB javascript was creating a session (note I’m only useing FB javascript, not the PHP api) that was somehow overwritting the values of my previous session.

I put the offending javascript back, and I tried changing the name of my session to $_SESSION[‘mytime’] or $_SESSION[‘time2’], but the problem still existed.
I tried using other time functions like date(‘Y-m-d G:h:s’), or date(‘Y-m-d G:h:s’).’test’ but the time is always incremented by a few seconds when retrieving the $_SESSION from the second page.

I am amazed that something like this can happen, and can’t imagine how it is possible, but I’ve gone back to it 4 times now, and every time I take out that one line of Javascript, everything works!

Unfortunately, not using facebook connect isn’t really an option for this project.

  • 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-05-15T04:36:13+00:00Added an answer on May 15, 2026 at 4:36 am

    My guess is that the main page is being executed twice, which is causing the session to restart with a new value assigned to $_SESSION[‘time’]. That is why it is always slightly incremented. Look at your web server logs, or use Fiddler to see if the page is being requested twice. If so, this may help.

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

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.