code:And if I were to click on "next page", the link automatically updates to:http://digg.com/submit?phase=2&url=http://www.domain.com/page4.html
code:Now, is this "auto append" (for lack of better term) of the URL a function that can be called via php/apache or is it some sort of variable within the script itself? I've dissected 2 different scripts that do this but I'll be damned if I can find a common thread so that's why I'm here.http://digg.com/submit?phase=2&url=http://www.domain.com/page5.html
code:Or is this something that has to be hard coded?http://digg.com/submit?phase=2&url={AUTOMATICALLY UPDATE URL WHERE BUTTON APPEARS}
code:but it doesn't seem to work...http://digg.com/submit?phase=2&url=$_SERVER['PHP_SELF']
code:Thanks for your help!<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
<html>
<head>
</head>
<body>
<?php
echo '<div align="right"><a href="http://digg.com/submit?phase=2&url='.curPageURL().'" target="_blank">Digg this page</a> </div><hr>';
?>
</body>
</html>
quote:Loi
Originally posted by ralph:
Sorry. I was busy.