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

Using Sodexo Meal Pass Card in BigBasket.com - How-to

How to Use Sodexo Meal Pass Card in Bigbasket.com Sodexo started to issue Smart Card similar to Credit Card--instead of their usual paper based vouchers. I was using Sodexo vouchers for longtime, but it was a big letdown when I can't get some of my unused vouchers renewed. And so, I was somehow happy with their new Meal Pass Card. But, again, it was a big letdown as I can't use it with BigBasket--where I usually use most of my meal coupon vouchers. SMS message from Sodexo on December 20, 2017 1:18 PM came as a big surprise, as I was waiting for this for longtime: Great News! Pay with your Sodexo Meal Card for food items ordered from Big Basket. Choose Sodexo in the payment section & pay on delivery. And so, this month, I tried to use my Sodexo Meal Pass Card in BigBasket. BigBasket website had not much information; I thought that I have to swipe my Meal Pass Card. Delivery person also didn't have much information; initially he was rejecting my Card! I trie...

"Fire MBAs" - Bob Lutz, former GM Vice Chairman

Personally, I don't value MBA degree (even though I have met and had very knowledgeable friends at college). For me, it's a hyped and useless degree. Most of the MBAs I have seen are pure Juggu Boys (sycophants) and irrational cabals, who can't take any decision on their own, but can only create chaos and politics. That's one of the reasons I like Paul Graham of Y-Combinator . He's a great icon for Hackers (to get back the respect). I just stumbled upon this link through Hacker News where TIME magazine reports on Bob Lutz's latest book Car Guys vs. Bean Counters: The Battle for the Soul of American Business . Some interesting notes: we need to fire the M.B.A.s and let engineers run the show. "if you can measure it, you can manage it" The only time Apple ever lost the plot was when it put the M.B.A.s in charge.  "Shoemakers should be run by shoe guys, and software firms by software guys."