Gayner Posted September 12, 2009 Share Posted September 12, 2009 function MakeRequest() { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("GET", "rofl.php", true); xmlHttp.send(null); } and rofl.php is : mysql_query("UPDATE ibf_members SET points = points+0.25 WHERE id={$ibforums->member["id"]} LIMIT 1"); So my users get 0.25 Forum Cash each time rofl.php is called. But i want my javascript to beable to hide that "rofl.php" so my users cant view source and find it and just keepr efreshing Link to comment https://forums.phpfreaks.com/topic/174025-my-ajax-php-code/ Share on other sites More sharing options...
Garethp Posted September 12, 2009 Share Posted September 12, 2009 You can't. You have to build some sort of validation into your rofl.php to prevent spamming Link to comment https://forums.phpfreaks.com/topic/174025-my-ajax-php-code/#findComment-917338 Share on other sites More sharing options...
Gayner Posted September 12, 2009 Author Share Posted September 12, 2009 You can't. You have to build some sort of validation into your rofl.php to prevent spamming What about this: http://www.w3schools.com/jsref/jsref_encodeURI.asp ? Link to comment https://forums.phpfreaks.com/topic/174025-my-ajax-php-code/#findComment-917339 Share on other sites More sharing options...
Garethp Posted September 13, 2009 Share Posted September 13, 2009 Look at the tutorial, anyone could just use decodeURI() to get the URL Link to comment https://forums.phpfreaks.com/topic/174025-my-ajax-php-code/#findComment-917504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.