Jump to content

Check activation status


WatsonN

Recommended Posts

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

// 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;}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.