There's no need for this to be a php file. You can still retrieve the URL parameter(s) using simple Javascript. If it is written in pure Javascript then people can host the page on their own web space so they are no longer dependent on the uptime of your website.
function GetUrlParam(paramName) { //https://css-tricks.com/snippets/javascript/get-url-variables/ var query = window.location.search.substring(1); var vars = query.split('&'); var len = vars.length; var pair = ''; for(var i = 0; i < len; i++) { pair = vars[i].split('='); if(pair[0] == paramName) return pair[1]; } return false; }
function closeWin() { window.close(); }
window.onload = function() { var t = GetUrlParam('t'); document.getElementById('targetText').innerText = ((t.length) ? (t) : ('')); } </script> </html>