如何使用卷曲与API密钥和API秘密检查许可密钥
我想请与卷曲和API密钥和API秘密如何使用卷曲与API密钥和API秘密检查许可密钥
这是返回值
在成功处理许可证密钥,许可证管理将返回一个纯文本
消息,将有类似于下面的二,三线:
成功许可证密钥WPLICMxx4bc2xxx1e471 或 错误密钥是INV alid
示例PHP代码 下面是一个示例PHP代码,展示了如何通过 创建许可证的API
/*** Mandatory data ***/
// Post URL
$postURL = "";
// The Secret key
$secretKey = "597c038865e788.30430360";
/*** Optional Data ***/
$firstname = "John";
$lastname = "Doe";
$email = "[email protected]";
// prepare the data
$data = array();
$data['secret_key'] = $secretKey;
$data['slm_action'] = 'slm_create_new';
$data['first_name'] = $firstname;
$data['last_name'] = $lastname;
$data['email'] = $email;
// send data to post URL
$ch = curl_init ($postURL);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returnValue = curl_exec ($ch);
// Process the return values
//var_dump($returnValue);
我想请与卷曲和API密钥和API秘密
的许可证密钥
您需要设置的HTTPHeader,用定义键(S),所以像
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'user: UserName', 'pass: blahPasswordHere' ));
user
和pass
将需要更改为任何接收服务器正在寻找
你可以请为我的代码 –
我不是在这里为你做你的工作。如果你不知道,这是你作为开发人员学习你的工艺的角色。 CURL并不困难。 – ggdx
谁downvoted,请解释。这是一个体面的问题? – ggdx
我想检查许可证密钥与卷曲和API密钥和API的秘密 –