following line in your code sends the request to the PHP script, if you want to send the sessionurl, security token etc along with the rest of the data, you can simply add following 'already-defined' variables
Code:
url = "ajax/saveCopyright.php?photoId=" + escape(phId)+ "&text=" + escape(cr_text)+"&rand="+new Date().getTime();
javascript variables of SESSIONURL and SECURITYTOKEN are defined on every VB page, so you can modify the coed like this
Code:
url = "ajax/saveCopyright.php?photoId=" + escape(phId)+ "&text=" + escape(cr_text)+"&rand="+new Date().getTime() + "&sessionUrl=" + SESSIONURL + "&securityToken=" +SECURITYTOKEN;
edit, btw sessionhash is stored in the cookie, you can get that in your PHP script using a code like bellow
PHP Code:
if(!empty($_COOKIE['bbsessionhash'])) {
$sessionHash = $_COOKIE['bbsessionhash'];
}