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 8794911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:18:56+00:00 2026-06-13T23:18:56+00:00

* THIS BIT IS FIXED IN STONE * We have 1 webpage with 3

  • 0

* THIS BIT IS FIXED IN STONE *


We have 1 webpage with 3 iFrames inside. All iFrames point to the same script but pass different querytring values. E.g.

  • Webpage: mypage.html
  • iFrame1: script.php?x=1
  • iFrame2: script.php?x=2
  • iFrame3: script.php?x=3

So when a user visits the webpage, they are calling script.php 3 times.


* QUESTION *


Is there a way to get script.php to be aware that it is being called 3 times by the same client/browser/person and then order or queue those calls? E.g.

  • 1st time – set an ID and save to session
  • 2nd time – get the ID from the session and use it
  • 3rd time – get the ID from the session and use it

What’s happening to me at the moment is that script.php is being executed 3 times at the same time and each iFrame is setting it’s own ID. I’d like them all to use the same ID.

Hope that makes sense?

Thanks in advance for you help.

Ryan

  • 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-13T23:18:57+00:00Added an answer on June 13, 2026 at 11:18 pm

    You need to track users with cookie, or IP address to know that it is the same user. And if you “save to session” then you HAVE TO have cookies used already (otherwise it is not really a session), so basically before you create new ID you just have to check if ID is not stored in session already. If not, generate it and use and also store in session.

    EDIT: You can use PHPSESSIONID for the purpose, as it will be the same as long as session is maintained. I suspect the only thing you need to tweak is ID generation in your code, to ensure ID was not already generated. If not, generate and save in session so further calls will not generate it again but return value stored in session. But please keep in mind that you may face concurrency here and 2nd request may arrive before your 1st is completed (this both will generate new IDs), so you shall either use locking to prevent this, or use PHPSESSIONID value if that suffices.

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

Sidebar

Related Questions

To this bit of code I pass the string kellogs special k and I
So I have this bit of code for x in range(x1,x2): for y in
I have this bit of code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;
i have this bit of code, it limits the Li's to 15 of them
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
This is a bit of a weird desire but I am making a matching
This is fixed thanks to Alex's answer below. So this is a bit of
This is a bit of an obscure issue, but I'm using jQuery Sortables and
I have quite a bit of experience with css and even this problem has
I know this is bit difficlut to explain but you'll get an idea by

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.