开发者

Get Current Page URL From Bookmark on toolbar using PHP

开发者 https://www.devze.com 2023-01-29 07:39 出处:网络
I am looking to get the url of current page in url开发者_如何学Python bar [BookMark Button In Tool Bar] - User Presses it while on a youtube link

I am looking to get the url of current page in url开发者_如何学Python bar

[BookMark Button In Tool Bar] - User Presses it while on a youtube link and sends it to sitename.com/test.php

The url in the bookmark then prints something like

sitename.com/test.php?url=http://www.youtbe.com/whateverwatever

I tried using referrer bur since it's coming from a bookmark link it won't work I also tried the referrer in Javascript but it still won't work


I believe you just want window.location.href. That'll get the current location then you can do what you want with it.


You can't do this, as there isn't a referrer if you click a bookmark.

If you're trying to make a "share this" bookmark sort of thing, you can use some JavaScript to make a "bookmarklet". Delicious has a bookmarklet that does this sort of thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消