$(function(){
var message = document.location.href;
$.post('/index.php', {message: message});
});
$_POST['message'];
<?php
echo $_POST['message'];
?>
$(function(){
var message = document.location.href;
$.post('/url.php', {message: message}, function(data){
alert(data);
});
});