Basically I'm looking for a script that will inform my users when they're leaving my site, like: You are now leaving This site! By clicking here you will be redirected. Anyone know of a script like this?
You could always use something like http://anonym.to/ which shows users a page before redirecting them (you may be able to customize the text, I'm not sure.) http://anonym.to/?http://anonym.to/en.html Some of the anonym.to code, which may or may not help - script link <script src="http://js.anonym.to/anonym/anonymize.js" type="text/javascript"></script> <script type="text/javascript"><!-- protected_links = ""; auto_anonymize(); //--></script> Code (markup): anonymize.js var protected_links = ""; var a_to_va = 0; var a_to_vb = 0; var a_to_vc = ""; function auto_anonymize() { auto_anonyminize(); } function auto_anonyminize() { var a_to_vd = window.location.hostname; if(protected_links != "" && !protected_links.match(a_to_vd)) { protected_links += ", " + a_to_vd; } else if(protected_links == "") { protected_links = a_to_vd; } var a_to_ve = ""; var a_to_vf = new Array(); var a_to_vg = 0; a_to_ve = document.getElementsByTagName("a"); a_to_va = a_to_ve.length; a_to_vf = a_to_fa(); a_to_vg = a_to_vf.length; var a_to_vh = false; var j = 0; var a_to_vi = ""; for(var i = 0; i < a_to_va; i++) { a_to_vh = false; j = 0; while(a_to_vh == false && j < a_to_vg) { a_to_vi = a_to_ve[i].href; if(a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("http://")) { a_to_vh = true; } j++; } if(a_to_vh == false) { a_to_ve[i].href = "http://anonym.to?" + a_to_vi; a_to_vb++; a_to_vc += i + ":::" + a_to_ve[i].href + "\n" ; } } var a_to_vj = document.getElementById("anonyminized"); var a_to_vk = document.getElementById("found_links"); if(a_to_vj) { a_to_vj.innerHTML += a_to_vb; } if(a_to_vk) { a_to_vk.innerHTML += a_to_va; } } function a_to_fa() { var a_to_vf = new Array(); protected_links = protected_links.replace(" ", ""); a_to_vf = protected_links.split(","); return a_to_vf; } Code (markup): I'm not good with javascript by any stretch of the imagination, but it seems that you would want to change a_to_ve[i].href = "http://anonym.to?" + a_to_vi; Code (markup): in anonymize.js to be a script on your site which would take the site after ? and show a page telling the user what ever you like. I could always help if you wanted help creating something specific. /R
What I want is a script that I can run the URLS through, like http://mysite.com/link.php?url=http://google.com The page would have a notice like this "Your are now leaving our site, click continue to go to link" Anyone else have any ideas?
Use the js I posed above to find all links on the site, and direct it to a page, say redir.php?url=http://url.com redir.php <?php echo "You are now being redirected to " . $_GET["url"] . "<br />Click <a href='" . $_GET["url"] . "'> here </a> to continue with the link"; ?> Code (markup):
maybe a simple script will help you <script> var browser_type=navigator.appName var browser_version=parseInt(navigator.appVersion) //if NS 6 if (browser_type=="Netscape"&&browser_version>=5) window.location.replace("http://www.yoursite.com") //if IE 4+ else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4) window.location.replace("http://www.yoursite.com") //if NS4+ else if (browser_type=="Netscape"&&browser_version>=4) window.location.replace("http://www.yoursite.com") //Default goto page (NOT NS 4+ and NOT IE 4+) else window.location="http://www.yoursite.com" </script> Code (markup):
i found some info, and i think it has ALOT to do with AJAX Link Tracker, but the coding is quite hard and confusing, i'll look into this matter~ it'll save me alot of work if i get it going, ovguide is using this javascript/ajax, but i don't think they'll teach you how to use it
the simplest way i've found is the use "http://www.example.com/Adpage.php?url=http://www.rapidshare.com/xxx" Your Need 2 PHP pages: One to Trigger the Above Link, The Other Is "Adpage.php" On Adpage.php just put the follow: "<?php echo "You are now being redirected to " . $_GET["url"] . "<br />Click <a href='" . $_GET["url"] . "'> here </a> to continue with the link"; ?>" And whatever you put after /Adpage.php?url="......" will be sent to the $_GET["url"] but the biggest problem is of course people will be able to look at your url variables, and just copy from it, so there should be another solution to this, i'm still looking into it