Jump to content

[SFR]SuperHomie

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by [SFR]SuperHomie

  1. Hello, first, sorry for ma bad english. I'am a german. I tryed to script a license-system, but the function "callRemote" doesn't work. It returns a "nil" Here the Server-Side code: function getIPFromWebserver () license = "testlic" curVersions = "1.0" remoteCall ( license, curVersions ) end function remoteCall () callRemote ( "http://license.*******.net/license_check.php", result, license, curVersions ) end addCommandHandler ( "license", getIPFromWebserver ) function result ( val ) print ( val ) end The wiki-example sais if it doesnt work, it returns "ERROR".. But the code returns "nil".. The-PHP: <?php include ( "class/license.class.php" ); include ( "class/ip.class.php" ); include ( "mta_sdk.php" ); $license = new license(); $ip = new ip(); $serverIP = $ip->getServerIP(); $serverLicense = $license->getLicenseFromIP ( $serverIP ); $licenseState = $license->getLicenseState ( $serverLicense ); $scriptName = $license->getScriptNameFromLicense ( $serverLicense ); $scriptVersion = $license->getScriptVersion ( $scriptName ); $input = mta::getInput(); if ( $license->isServerInLicenseDatabase ( $serverIP ) ) { if ( $input[1] == $scriptVersion ){ mta::doReturn ( $licenseState ); }else{ mta::doReturn ( "updateRequired" ); } }else{ mta::doReturn ( "notExist" ); } ?> The-PHP-Script is working, when i go with my browser to check this, it returns the licenseState, but when i call this via lua-script, it returns a "nil".. Pls help me ._.
×
×
  • Create New...