WatsonN Posted October 1, 2010 Share Posted October 1, 2010 Howdy I'm trying to figure out to get a file to call a page on another domain(diffrent server) and check if the activation code matches the one on the activation server. So on the user's server it has a cron job or on load will call my server and run the code in their update.php file against my activation.php file and see if it matches. If($usr == $actv){ //DO THIS }else{ //run disable script } Link to comment https://forums.phpfreaks.com/topic/214948-check-activation-status/ Share on other sites More sharing options...
Pawn Posted October 2, 2010 Share Posted October 2, 2010 // activation.phpif(empty($_GET['id'])) { // I assume you need some kind of ID to generate your activation code exit;} else { $activation_code = md5($_GET['id']); // or whatever echo $activation_code;}// update.php$activation_code = "myactivationcode";$id = "myaccountid";$remote_url = "http://site.com/activation.php?id=".$id;$remote_code = file_get_contents($remote_url);if($activation_code == $remote_code) { echo "Valid!";} else { echo "Invalid!"; exit;} Link to comment https://forums.phpfreaks.com/topic/214948-check-activation-status/#findComment-1118208 Share on other sites More sharing options...
WatsonN Posted October 2, 2010 Author Share Posted October 2, 2010 Thank Ya Pawn, That worked perfectly Link to comment https://forums.phpfreaks.com/topic/214948-check-activation-status/#findComment-1118229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.