n30x Posted April 10, 2012 Share Posted April 10, 2012 Hi all. I'm using this on my login panel: callRemote("http://******.php", password) This sends password entered on form to the PHP SDK file This is the php file code: <?php include('sdk/mta_sdk.php'); $table = mta::getInput(); $text = $table[0]; if(isset($text)){ $encrypted = md5($text) mta::doReturn($encrypted); } ?> These are my codes. When i click at Login and username + password entered on debugscript says that 3rd value must be a string. Please help. Thanks. Link to comment
Castillo Posted April 10, 2012 Share Posted April 10, 2012 You didn't fill all the required arguments listed on the wiki page. Required Argumentshost: This is a host name - including the HTTP port - of the server you wish to connect to. resourceName: This is a name of the resource that contains the exported function you want to call. functionName: This is a string with the name of the function which you want to call. URL: A full URL in the format http://hostname/path/file.ext. A port can be specified with a colon followed by a port number appended to the hostname. callbackFunction: This is the function that should receive the data returned from the remote function call. The argument list should match the format of the data returned. The callback function will be passed a string containing "ERROR" followed by an integer indicating the error code when an error occurs calling the function. A list of error codes can be found on the cURL website. Link to comment
n30x Posted April 10, 2012 Author Share Posted April 10, 2012 So, if i'm not wrong, it must be: callRemote("http://*****.php", md5it, password) And on the .php must be: "function md5it ()". Am i wrong ? Link to comment
Castillo Posted April 10, 2012 Share Posted April 10, 2012 May I ask what is this for? what I see is that your PHP script is encrypting the password with MD5, but you can do this on MTA already. Link to comment
n30x Posted April 10, 2012 Author Share Posted April 10, 2012 It's for connecting server with forums. I'm encrypting password entered on form and then calling back the function, i'm checking if the encrypted form password is the same as the forum which is encrypted too. I use vbulletin. Link to comment
drk Posted April 10, 2012 Share Posted April 10, 2012 callRemote("http://******.php", callBack, data) data -> the data you wanna send to php file. callBack -> The function you want to execute with returned data from php. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now