Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<a onclick="storeIT('link id or whatever you want to store');" href="[URL unfurl="true"]www.gohere.com">Click[/URL] it</a>
<script>
function storeIT(strVal) {
[indent]$.ajax({
url: "storeIT.php",
type: "POST",
data: 'strVal='+escape(strVal),
success: function(response) {
// whatever you may want to do once process finishes ...
}
});[/indent]
}
[ul]sunbase said:I want to monitor who calls a URL
feherke said:if he means logged in user...
. Routing will only work for urls triggering some url shortener/expander jump script or mod_rewrite and not direct urls to some file (htm,pdf,jpg,...)
I want to monitor who calls a URL and when so I want the click on the link to write to a table
OlafDoschke said:Well, you only think about the links in a browser DOM.
<?php
$destname = strtolower($_GET["name"]);
$Dests = array(
"amazon"=>"[URL unfurl="true"]http://www.amazon.co.uk",[/URL]
"ebay"=>"[URL unfurl="true"]http://www.ebay.co.uk",[/URL]
"clickbank"=>"[URL unfurl="true"]http://affname.reseller.hop.clickbank.net",[/URL]
"auctads"=>"[URL unfurl="true"]http://www.auctionads.com/",[/URL]
"cj"=>"[URL unfurl="true"]http://www.cj.com/",[/URL]
"yahoo"=>"[URL unfurl="true"]http://www.yahoo.com/",[/URL]
"goog"=>"[URL unfurl="true"]http://www.google.com/",[/URL]
"msn"=>"[URL unfurl="true"]http://www.msn.com/"[/URL]
);
// Code can be inserted in here to log the clickthrough into a database ;
header("HTTP/1.1 301 Moved Permanently");
// comment out the line above to send the default 302 redirect;
header("Location: " . $Dests[$destname]);
exit();
?>
<a href="local-jump-2-uri.php?name=amazon" >anchor text</a>
... ... and when so I want the click on the link to write to a table, before executing the link, is this possible and how does a simpleton like me make it happen?
<?php
$desturi = strtolower($_GET["url"]);
// Code can be inserted in here to log the clickthrough (current user, url) into a database ;
header("HTTP/1.1 301 Moved Permanently");
// comment out the line above to send the default 302 redirect;
header("Location: " . $desturi);
exit();
?>
<a href="[URL unfurl="true"]http://amazon.com?affid=az1234567890&prod=ASIN786543290adreff"[/URL] >Buy this book on Amazon</a>