本文整理汇总了PHP中Http::setURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Http::setURL方法的具体用法?PHP Http::setURL怎么用?PHP Http::setURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Http
的用法示例。
在下文中一共展示了Http::setURL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Http
$mem_id_r = $_POST["mem_id_r"];
$s_type = $_POST["s_type"];
$photo = $_POST["photo"];
$music = $_POST["music"];
$gubun = $_POST["gubun"];
$flashcon = $_POST["flashcon"];
$skin = $_POST["skin"];
$_dummy_cmt_ = $_POST["_dummy_cmt_"];
$mem_sex_r = $_POST["mem_sex_r"];
$_encode_value_ = $_POST["_encode_value_"];
$eventKey = $_POST["eventKey"];
$comment = $_POST["comment"];
$cookie = $_POST["cookie"];
$ua = $_POST["ua"];
$obj = new Http();
$obj->setURL("http://www.club5678.com/pomem/paper/_p2p/send_post.php");
$obj->setReferer("http://www.club5678.com/pomem/paper/_p2p/send.html?mem_id_r=" . $mem_id_r . "&s_type=01");
$obj->setParam("mem_id_r", $mem_id_r);
$obj->setParam("s_type", $s_type);
$obj->setParam("mem_id_e", $mem_id_e);
$obj->setParam("photo", $photo);
$obj->setParam("music", $music);
$obj->setParam("gubun", $gubun);
$obj->setParam("flashcon", $flashcon);
$obj->setParam("skin", $skin);
$obj->setParam("_dummy_cmt_", $_dummy_cmt_);
$obj->setParam("mem_sex_r", $mem_sex_r);
$obj->setParam("_encode_value_", $_encode_value_);
$obj->setParam("eventKey", $eventKey);
$obj->setParam("isZzim", "0");
$obj->setParam("isNew", "");
示例2: act_accountInforIntegation
public function act_accountInforIntegation()
{
$dpId = $_REQUEST['dpId'];
$developerMod = M('Developer');
if (!$dpId) {
self::$errMsg['12000'] = "未获取到该用户的ID,无法同步信息至开放系统!";
return false;
}
$basInfoSta = $developerMod->getDeveloper("*", "id = " . $dpId);
if (!empty($basInfoSta)) {
$sendInfor = array("username" => $basInfoSta[0]['app_key'], "password" => $basInfoSta[0]['login_pwd'], "token" => $basInfoSta[0]['token'], "groupid" => 10, "email" => $basInfoSta[0]['email'], "mobile" => $basInfoSta[0]['phone'], "qq" => '', "address" => $basInfoSta[0]['address2'] . " " . $basInfoSta[0]['address'], "company" => $basInfoSta[0]['company'], "status" => $basInfoSta[0]['status'], "regtime" => $basInfoSta[0]['create_time'], "regip" => '', "logintime" => '', "loginip" => '');
} else {
self::$errMsg[10131] = get_promptmsg(10131, '分销商');
return false;
}
$synStatus = array();
//开始同步到开放系统 外网
include_once WEB_PATH . 'lib/service/http.php';
$http = new Http('http://idc.open.valsun.cn/admin_open/openInterface.php');
$http->addPostParam(array('distributionBasicInfor' => json_encode($sendInfor)));
$http->addHeader("Author:zoujunrong");
if (!$http->post()) {
//如果是javascript请求,输出是给javascript的,可能就需要对输出转码
self::$errMsg[10145] = get_promptmsg(10145, $http->err_str);
return false;
} else {
// echo $http->getResponse('header')."---header<br/>";
$synStatus["outOpenSystem"] = $http->getContent();
}
//开始同步到开放系统 外网
$http->setURL('http://open.valsun.cn:88/admin_open/openInterface.php');
$http->addPostParam(array('distributionBasicInfor' => json_encode($sendInfor)));
$http->addHeader("Author:zoujunrong");
if (!$http->post()) {
//如果是javascript请求,输出是给javascript的,可能就需要对输出转码
self::$errMsg[10146] = get_promptmsg(10146, $http->err_str);
return false;
} else {
// echo $http->getResponse('header')."---header<br/>";
$synStatus["innerOpenSystem"] = $http->getContent();
}
return $synStatus;
}