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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:16:19+00:00 2026-06-03T05:16:19+00:00

Here is what I would do in JavaScript. Is there any way to do

  • 0

Here is what I would do in JavaScript. Is there any way to do it in php?
I am working on a project that needs this functionality but cannot use JavaScript.

setInterval ( "checkHistory()", 1000 );

function checkHistory() {
   if (oldHistLength != history.length) {
      removegateway();
      oldHistLength = history.length;
   }
}
  • 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-03T05:16:20+00:00Added an answer on June 3, 2026 at 5:16 am

    Sorry to say that it’s not possible to do that using PHP. Your only option is to use JavaScript somewhere.

    You can however achieve what I believe you’re trying to do with another technique – PHP Sessions and Request URIs.

    This involves storing the user’s accessed URLs into a variable (or you could use MySQL) which can be referenced anywhere on the website within that current session.

    Here’s an (untested) example:

    <?php
    session_start();
    
    // Retrieve/create the current list
    if( isset($_SESSION['history']) ) {
        $history = $_SESSION['history'];
    } else {
        $history = new array();
    }
    
    // Add the current URL to the history array
    array_push($history, $_SERVER['REQUEST_URI']);
    
    // Do anything else you want to here
    
    // Store the array again
    $_SESSION['history'] = $history;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if there was any way through php or javascript I could
Any help here would be greatly appreciated. I have this table hospital Nurse |
Is there any way I could, using only Javascript and HTML, have a page
Is there any way to check within JavaScript if XMLHttpRequest object supports W3C Progress
Is there any way that I can define a destructor for an object in
Is there any way to create a function with a real name that's determined
$('#selector').click(function() { // here I would like to load a javascript file // let's
General javascript question here, which would also be good to know how(if possible) to
I think most C++ programmers here would agree that polluting the global namespace is
I am relatively new to db design, so any help here would be appreciated.

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.