【发布时间】:2012-07-20 23:06:41
【问题描述】:
在我的 API 访问文件中,我有以下代码
//operation was successful get the token from the reponse.
$challengeToken = $r->result->token;
// to this point, we have got the token
$userAccessKey = 'jkdijakjiejkdj25';
//generate key
$generatedKey = md5($challengeToken.$userAccessKey);
我正在使用 http_request2 类发送帖子数据,通过声明
$loginrequest = new HTTP_Request2('http://vijayholdings.com/admin/webservice.php?operation=login&username=admin&accessKey=('.$generatedKey.')', HTTP_Request2::METHOD_POST);
谁能告诉我如何在作为参数给类的 URL 中包含 $generatedKey?
暂时
$loginrequest = new HTTP_Request2('http://vijayholdings.com/admin/webservice.php?operation=login&username=admin&accessKey=$generatedKey', HTTP_Request2::METHOD_POST);
我也试过这个,但是失败了……
请指导我
【问题讨论】:
标签: php oop http variables http-post