Skip to main content

Track previous link of a site in PHP

I just spotted through Google that Raj Shekhar has quoted my post to comp.lang.php in his Blog Ideas page:

mr_burns wrote:
> Is it possible to get the previous url. For example, if I am on page
> page01.php - and I then click to - page02.php - from page02.php, can
> use script to determine that I have come from page01.php? It doesnt
> have to be the entire url, even just the file name. Cheers

Add this line in the beginning of every script or possibly using a
global-common include file say config.php

output_add_rewrite_var('referer', htmlspecialchars($_SERVER['PHP_SELF']));

Comments

Popular posts from this blog

BehaviorS.js - An alternative to Behaviour.js, event:Selectors and Low Pro libs for unobtrusive JavaScript programming

BehaviorS.js yet another unobtrusive JavaScript library similar to Behaviour.js and event:Selectors but in implementation uses hash based lookup without extending elements; so presumably it should be faster than the rest. The original script and idea was by JLof ; I extended it for DOMContentLoaded support, optimized a bit to avoid scanning of more depths, and added new rules support. I wanted to document the plug a long time and just got time to do it. For the time being BehaviorS.js is available here Update (2006-09-11) : Coralized the link to BehaviorS.js so as to save the load on free brinkster.com webpage Update (2006-09-27) : If the coralized link to BehaviorS.js doesn't work, use http://www21.brinkster.com/guideme/BehaviorS/ Update (2025-06-07) : Now available in https://github.com/rrjanbiah/behaviorsjs

Koodankulam - another ISRO? And best critic from John Rubert

Mahendragiri ISRO is situated close to my hometown and now Koodankulam ... When ISRO was started, there were no industries. At that time, everyone was happy about the project as many believed that it would create more employment opportunities. (As per some conspiracy theories, Kanyakumari was sidelined for being Congress-fort then). Later on few guys got job there... and later on they complained that they're been transferred to other place for being local guys--by Anti-Tamil seniors. Few months ago, an Engineer from Secundrabad who's working in ISRO joined me in train. The guy shared some information... he's recruited/recommended by his Secundrabad colleague, his ambition is to work in NASA, his job is just to check meter and make a note of it..., many guys have similar boring jobs... Anybody who's complaining IT guys should talk to these ISRO guys! ISRO is a big example on how Indian government is spending crores of rupees lavishly. Majority of the projects--ac...

Save American College, Madurai (Update 2011)

This article was written on Jan 16, 2011 and updated on Jan 26, 2011, Mar 16, 2011, Mar 21, 2011, Mar 28, 2011, Apr 10, 2011, and May 1, 2011 In 2008, I have written Save American College, Madurai that seemed to help many people including alumni to understand the situation, politics and chaos. At that time, I was favoring Principal's party as favoring Bishop's party could turn adverse as they're was already trying to replace non-permanent staffs; in fact, I have even donated a meager amount for the legal battle.[ Update : Corrected the sentence to convey the intended meaning. Thanks for those who pointed out] This time, people hit the same old article and asking the details. When I contacted, this time, nobody have clear reason for the chaos--except that it's a ego clash between Principal and Bishop party. Problems and reasons Till now, all bishops were being part of The American College, Madurai Governing Council. All/Most of the bishops played subtle r...