Forum Moderators: coopster
I'm trying to add links to my site to recommend articles to stumbleupon, digg etc and need to automaticaly include the url of the page in the link to recommend it so the link on the page www.example.com/details.php?id=55
looks something like:
www.example.com/submit?url=www.example.com/details.php?id=55
is there a universal way to write this?
Any help would be greatly appreciated.
[edited by: Rog82 at 4:37 pm (utc) on Oct. 1, 2007]
[edited by: dreamcatcher at 7:25 am (utc) on Oct. 2, 2007]
[edit reason] Use example.com, thanks. [/edit]
$thisurl = "http://www.example.com" . $_SERVER['REQUEST_URI']);
$link = "www.example.com/submit?url=" . urlencode($thisurl);
[edited by: dreamcatcher at 7:26 am (utc) on Oct. 2, 2007]
[edit reason] Use example.com, thanks. [/edit]
$thisurl = "http://www.example1.com" . $_SERVER['REQUEST_URI']);
line in above the box with the links in and it just printed the line on the page
also should the link look like:
<a href="http://www.example2.com/submit?url=". urlencode($thisurl);> Example 2</a>
(where example1 is my site and example2 is the destination site)
thanks
$thisurl = "http://www.example.com" . $_SERVER['REQUEST_URI']);
$link = "www.example.com/submit?url=" . urlencode($thisurl);[edited by: dreamcatcher at 7:26 am (utc) on Oct. 2, 2007]
[edit reason] Use example.com, thanks. [/edit]
except that it's a different example.com, so you just confused my "example", thanks.
let's try this:
$thisurl = "http://www.example.com" . $_SERVER['REQUEST_URI'];
$link = "bookmark.example.com/submit?url=" . urlencode($thisurl);
$link = "bookmark.example.com/submit?url=" . urlencode($thisurl);
doesn't create a link, I just get that printed on the page. Is there a way to write it in the form:
<a href="bookmark.example.com/submit?url=" . urlencode($thisurl);>bookmark.example</a>
currently trying this it links exactly as it is writen rather than replacing the last bit with the pages URL.
Cheers
[edited by: Rog82 at 11:37 am (utc) on Oct. 3, 2007]