unidox Posted May 20, 2008 Share Posted May 20, 2008 I have this script to check if the license if valid: $url = "http://www.site.com/license.php?key=" . SITE_LIC . "&ref=" . $_SERVER["HTTP_REFERER"] . ""; $lic = @fopen($url, "r"); $lic = @fread($lic, 10); if ($lic == "0") { header("Location: http://www.site.com/index.php?p=lic_invalid"); exit(); } I know I have the correct lic key and refferer. Just it still keeps forwarding to the lic_invalid page. Link to comment https://forums.phpfreaks.com/topic/106389-license/ Share on other sites More sharing options...
sKunKbad Posted May 20, 2008 Share Posted May 20, 2008 I am wondering about SITE_LIC in line 1. I have searched php.net and haven't found anything in regards to using this variable. Link to comment https://forums.phpfreaks.com/topic/106389-license/#findComment-545352 Share on other sites More sharing options...
unidox Posted May 20, 2008 Author Share Posted May 20, 2008 I defined it earlier. Link to comment https://forums.phpfreaks.com/topic/106389-license/#findComment-545353 Share on other sites More sharing options...
sKunKbad Posted May 20, 2008 Share Posted May 20, 2008 Even though the code seems simple, I would try changing the variable for the handle $lic = @fopen($url, "r"); $lic = @fread($lic, 10); Link to comment https://forums.phpfreaks.com/topic/106389-license/#findComment-545357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.