PDA

View Full Version : Get refer from bookmark


marcus1060
09-24-2007, 05:28 AM
I'm trying to make it so a user can drag a link into their bookmarks, or tool bar and click it and it will add the site they were on previous to a online bookmark.
Kind of like Google uses for some of their scripts.
However, it's not working for me, seems like the browser won't send the refer since the page they were on before technically wasn't referring them.
I was trying to use $_SERVER['HTTP_REFERER'], but it is not working.
Anyone have any ideas?
Thanks!

Inigoesdr
09-24-2007, 06:59 AM
Yeah, that wouldn't work since the referrer isn't going to be set. I don't think there's a way to do what you're asking short of using a browser extension maybe.

marcus1060
09-24-2007, 08:27 AM
I found out they use Javascript, you would add something like this as the bookmark:
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://example.com/file.php?query='+c(b.location) + '','coop_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',heigh t=420px,width=700px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();