本文整理汇总了PHP中post_data函数的典型用法代码示例。如果您正苦于以下问题:PHP post_data函数的具体用法?PHP post_data怎么用?PHP post_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了post_data函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _thumb_media_id
function _thumb_media_id($cover_id)
{
$cover = get_cover($cover_id);
$driver = C('PICTURE_UPLOAD_DRIVER');
if ($driver != 'Local' && !file_exists(SITE_PATH . $cover['path'])) {
// 先把图片下载到本地
$pathinfo = pathinfo(SITE_PATH . $cover['path']);
mkdirs($pathinfo['dirname']);
$content = wp_file_get_contents($cover['url']);
$res = file_put_contents(SITE_PATH . $cover['path'], $content);
if ($res) {
return '';
}
}
$path = $cover['path'];
if (!$path) {
return '';
}
$param['type'] = 'thumb';
$param['media'] = '@' . realpath(SITE_PATH . $path);
$url = 'https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=' . get_access_token();
$res = post_data($url, $param, true);
if (isset($res['errcode']) && $res['errcode'] != 0) {
return '';
}
$map['cover_id'] = $cover_id;
$map['manager_id'] = $this->mid;
$this->where($map)->setField('thumb_media_id', $res['media_id']);
return $res['media_id'];
}
开发者ID:walkingmanc,项目名称:weshop,代码行数:30,代码来源:MaterialModel.class.php
示例2: get_token
/**
* get_token gets an edit token
*
* @return string edit token
*/
function get_token()
{
$postdata = http_build_query(array('action' => 'tokens', 'format' => 'json'));
$page = post_data($postdata);
$token = $page->{'tokens'}->{'edittoken'};
return $token;
}
开发者ID:Atlasmuseum,项目名称:AM,代码行数:12,代码来源:API_CommonFunctions.php
示例3: getDomainInfo
function getDomainInfo()
{
$url = 'https://dnsapi.cn/Domain.List';
$config = array('login_email' => '[email protected]', 'login_password' => 'pdcxaje127', 'format' => 'json', 'lang' => 'cn', 'error_on_empty' => 'no');
$post_data = post_data($url, $config);
return json_decode($post_data, true);
}
开发者ID:ulpyuxa,项目名称:wishorder.wishtool.com,代码行数:7,代码来源:pi_ddns.php
示例4: move_group
function move_group($id, $group_id)
{
is_array($id) || ($id = explode(',', $id));
$data['uid'] = $map['uid'] = array('in', $id);
// $data ['group_id'] = $group_id; //TODO 前端微信用户只能有一个微信组
$res = M('auth_group_access')->where($data)->delete();
$data['group_id'] = $group_id;
foreach ($id as $uid) {
$data['uid'] = $uid;
$res = M('auth_group_access')->add($data);
// 更新用户缓存
D('Common/User')->getUserInfo($uid, true);
}
$group = $this->find($group_id);
// 同步到微信端
if (C('USER_GROUP') && !empty($group['wechat_group_id'])) {
$url = 'https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=' . get_access_token();
$map['token'] = get_token();
$follow = M('public_follow')->where($map)->field('openid, uid')->select();
foreach ($follow as $v) {
if (empty($v['openid'])) {
continue;
}
$param['openid'] = $v['openid'];
$param['to_groupid'] = $group['wechat_group_id'];
$param = JSON($param);
$res = post_data($url, $param);
}
}
return $group;
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:31,代码来源:AuthGroupModel.class.php
示例5: create_notice
/**
* create_notice
*
* @return string
*/
function create_notice()
{
$title = "New Page (" . date("Y-m-d H:i:s") . ")";
$text = "{{Notice d'œuvre\n|titre= \nartiste= \n}}";
// Post new content
$postdata = http_build_query(array('action' => 'edit', 'format' => 'json', 'title' => $title, 'text' => $text, 'token' => get_token()));
$page = post_data($postdata);
return $page->{'edit'}->{'pageid'};
#return 'undefined';
}
开发者ID:Atlasmuseum,项目名称:AM,代码行数:15,代码来源:API_CreateNotice.php
示例6: reply
function reply($dataArr, $keywordArr = array())
{
// addWeixinLog ( $dataArr, 'PublicBindModel' );
if ($dataArr['Content'] == 'TESTCOMPONENT_MSG_TYPE_TEXT') {
$this->replyText('TESTCOMPONENT_MSG_TYPE_TEXT_callback');
} elseif (strpos($dataArr['Content'], 'QUERY_AUTH_CODE') !== false) {
// addWeixinLog ( $dataArr ['Content'], '222' );
$query_auth_code = str_replace('QUERY_AUTH_CODE:', '', $dataArr['Content']);
$info = D('Addons://PublicBind/PublicBind')->getAuthInfo($query_auth_code);
// addWeixinLog ( $info, '555' );
$param['touser'] = $dataArr['FromUserName'];
$param['msgtype'] = 'text';
$param['text']['content'] = $query_auth_code . '_from_api';
$url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=' . $info['authorization_info']['authorizer_access_token'];
// addWeixinLog ( $param, $url );
$res = post_data($url, $param);
} else {
$this->replyText($dataArr['Event'] . 'from_callback');
}
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:20,代码来源:WeixinAddonModel.class.php
示例7: htmlspecialchars
<?php
//header('Content-type: application/json');
require './../config.php';
require './../functions.php';
if ($_POST == null) {
exit;
}
if (post_data('email') != null and post_data('password') == null) {
$email = htmlspecialchars($_POST['email']);
$total = count($DB->query("SELECT * FROM user WHERE email=?", array($email)));
if ($total == 1) {
$result = array('valid' => 'true');
} else {
$result = array('valid' => 'false');
}
} else {
$myusername = $_POST['email'];
$mypassword = $_POST['password'];
$mypassword = MD5($mypassword . '404notfound');
$count = count($DB->query("SELECT * FROM user WHERE email=? and pass=?", array($myusername, $mypassword)));
if ($count == 1) {
session_start();
$_SESSION['myusername'] = $myusername;
$_SESSION['mypassword'] = $mypassword;
$result['message'] = "success";
// session_register("mypassword");
//header("location:userpanel.php");
} else {
$result['message'] = "errow";
}
开发者ID:zhangwen9229,项目名称:404-Not-Found,代码行数:31,代码来源:login.php
示例8: upload_youkang_image
function upload_youkang_image($path, $type = 'image')
{
$url = 'http://www.youkang120.com:84/uploadAudio?userName=18820475115&pwd=123456&bizType=2';
$param['type'] = $type;
$param['media'] = '@' . realpath($path);
$end = '\\r\\n';
$twoHyphens = '--';
$boundary = '************';
$header[] = 'Content-Type: multipart/form-data;boundary=' . $boundary;
$res = post_data($url, $param, true);
if (isset($res['errcode']) && $res['errcode'] != 0) {
$this->error(error_msg($res, '图片上传'));
exit;
}
$content = $twoHyphens . $boundary;
$content = $end;
$content = 'Content-Disposition: form-data; ' . 'name="file1";filename="image.jpg"';
$content = $end;
$content = $end;
//file
$twoHyphens . $boundary . $twoHyphens;
$end;
return $res['media_id'];
}
开发者ID:kevinstudio,项目名称:zaodianla,代码行数:24,代码来源:wx_sample.php
示例9: _get_file_media_id
function _get_file_media_id($file_id, $type = 'voice', $title = '', $introduction = '')
{
$fileInfo = M('file')->find($file_id);
if ($fileInfo) {
$path = '/Uploads/Download/' . $fileInfo['savepath'] . $fileInfo['savename'];
if (!$path) {
$this->error('获取素材失败');
exit;
}
$param['type'] = $type;
$param['media'] = '@' . realpath(SITE_PATH . $path);
if ($type == 'video') {
$param['description']['title'] = $title;
$param['description']['introduction'] = $introduction;
}
$url = 'https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=' . get_access_token();
$res = post_data($url, $param);
if (!$res) {
$this->error('同步失败');
}
if (isset($res['errcode']) && $res['errcode'] != 0) {
$this->error(error_msg($res, '素材上传'));
exit;
}
}
return $res['media_id'];
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:27,代码来源:MaterialController.class.php
示例10: getPublicInfo
function getPublicInfo($authorizer_appid)
{
$res['status'] = false;
$component_access_token = $this->_get_component_access_token();
if ($component_access_token == false) {
$res['msg'] = '获取access_token失败!';
return $res;
}
$key = 'getPublicInfo_' . $authorizer_appid;
$data = S($key);
if ($data === false) {
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token=' . $component_access_token;
$param['component_appid'] = $this->component_appid;
$param['authorizer_appid'] = $authorizer_appid;
$data = post_data($url, $param);
if (!isset($data['authorizer_info']['user_name'])) {
$res['msg'] = '获取公众号信息失败!';
return $res;
}
S($key, $data, $data['expires_in']);
}
return $data;
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:23,代码来源:PublicBindModel.class.php
示例11: array
<?php
$appKey = '123456';
$appSecret = '123456';
$mobileNumber = '13578888888';
$amount = '10';
$url = 'http://121.40.104.167:8080/charge/mobilefee';
$param = array('appKey' => $appKey, 'mobileNumber' => $mobileNumber, 'amount' => $amount, 'verify' => md5($appKey . $mobileNumber . $amount . $appSecret));
function post_data($url, $param)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($param));
// curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');
// curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
return $server_output;
}
$res = post_data($url, $param);
var_dump(json_decode($res));
开发者ID:flydement,项目名称:MyTest,代码行数:24,代码来源:demo.php
示例12: _video_download
function _video_download($media_id, $cover_url)
{
$savePath = SITE_PATH . '/Uploads/Download/' . time_format(NOW_TIME, 'Y-m-d');
mkdirs($savePath);
$ext = 'mp4';
if (empty($cover_url)) {
// 获取图片URL
$url = 'https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=' . get_access_token();
$param['media_id'] = $media_id;
$info = post_data($url, $param);
if (isset($info['errcode']) && $info['errcode'] != 0) {
$this->error(error_msg($info, '下载视频文件素材失败'));
exit;
}
return $info;
} else {
$content = wp_file_get_contents($cover_url);
// 获取图片扩展名
$picExt = substr($cover_url, strrpos($cover_url, '=') + 1);
// $picExt=='jpeg'
if (empty($picExt)) {
$picExt = $ext;
}
$picName = NOW_TIME . '.' . $picExt;
$picPath = $savePath . '/' . $picName;
$res = file_put_contents($picPath, $content);
if (!$res) {
$this->error('远程视频文件下载失败');
exit;
}
}
$cover_id = 0;
if ($res) {
// 保存记录,添加到picture表里,获取coverid
$url = U('File/uploadPicture', array('session_id' => session_id()));
$_FILES['download'] = array('name' => $picName, 'type' => 'application/octet-stream', 'tmp_name' => $picPath, 'size' => $res, 'error' => 0);
$File = D('File');
$file_driver = C('DOWNLOAD_UPLOAD_DRIVER');
$info = $File->upload($_FILES, C('DOWNLOAD_UPLOAD'), C('DOWNLOAD_UPLOAD_DRIVER'), C("UPLOAD_{$file_driver}_CONFIG"));
$cover_id = $info['download']['id'];
unlink($picPath);
}
return $cover_id;
}
开发者ID:PunkAvail,项目名称:ThinkWechat,代码行数:44,代码来源:MaterialController.class.php
示例13: tongbu_follow
function tongbu_follow()
{
$map['manager_id'] = $this->mid;
$map['token'] = get_token();
$list = M('auth_group')->where($map)->select();
foreach ($list as $v) {
$arr[$v['id']] = $v['wechat_group_id'];
}
$id = I('id', 0, 'intval');
$map['id'] = array('gt', $id);
$map['has_subscribe'] = 1;
$map['token'] = get_token();
$follow_list = M('public_follow')->where($map)->order('id asc')->limit(5)->select();
if (!$follow_list) {
echo 'update over!';
exit;
}
$access_token = get_access_token();
$url = 'https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=' . $access_token;
foreach ($follow_list as $follow) {
$param['openid'] = $follow['openid'];
$param['to_groupid'] = intval($arr[$follow['group']]);
$param = JSON($param);
$res = post_data($url, $param);
$has_subscribe = $res['errcode'] == 43004 ? 0 : 1;
M('public_follow')->where('id=' . $follow['id'])->setField('has_subscribe', $has_subscribe);
}
$param2['id'] = $follow['id'];
$url = U('tongbu_follow', $param2);
$url = addons_url('tongbu_follow');
$this->success('同步用户数据中,请勿关闭', $url);
// echo 'update follow_id: ' . $follow ['id'] . ', please wait!';
// echo '<script>window.location.href="' . $url . '";</script>';
}
开发者ID:kevinstudio,项目名称:zaodianla,代码行数:34,代码来源:AuthGroupController.class.php
示例14: GetDescribeSenURL2
}
echo "</div>";
//
if (isset($_POST['descsensor'])) {
// 2. DescribeSensor
echo "<h2> The Details of Sensors in SOS </h2>";
$procedure = $_POST['descsensor'];
//echo $procedure."<br/>";
// sample request
//$dSensorURL = "http://localhost/istsos/service_name?service=SOS&request=describeSensor&procedure=hum_bs_1&responseFormat=text/xml;subtype='sensorML/1.0.0'&version=1.0.0";
$dSensorURL = GetDescribeSenURL2($DescribeSenStr, $procedure, $RespFormat);
session_start();
$dSensorURL = $_SESSION['rawURL'] . $dSensorURL;
$dSensorstring = "";
//echo "URL Used / Accessed: ".$dSensorURL."</br>";
$dSoutput = post_data($dSensorURL, $dSensorstring);
//print_r($dSoutput);
// a. Quantity
$Quantity = array('Quantity', 'definition');
$myQuantity = parse_describeSense($dSoutput, $Quantity);
$myCleanQuantity = cleanQuantity($myQuantity);
//print_r($myCleanQuantity);
// b. co-ordinates
$reference = array('Point', 'srsName', 'gml:id');
$myCoOrd = getCoOrdinates($dSoutput, $reference);
//echo "</br></br>";
//print_r($myCoOrd);
// c. Sensing time Interval
$reference = 'interval';
$myInterval = getInterval($dSoutput, $reference);
//echo "</br></br>";
开发者ID:abhishekvp,项目名称:php_istSOS_client,代码行数:31,代码来源:desc_sensor.php
示例15: get_image_media_id
function get_image_media_id($cover_id)
{
$cover = get_cover($cover_id);
$driver = C('PICTURE_UPLOAD_DRIVER');
if ($driver != 'Local' && !file_exists(SITE_PATH . $cover['path'])) {
// 先把图片下载到本地
$pathinfo = pathinfo(SITE_PATH . $cover['path']);
mkdirs($pathinfo['dirname']);
$content = wp_file_get_contents($cover['url']);
$res = file_put_contents(SITE_PATH . $cover['path'], $content);
if (!$res) {
$this->error('远程图片下载失败');
}
}
$path = $cover['path'];
if (!$path) {
$this->error('获取图片素材失败');
}
$param['type'] = 'image';
$param['media'] = '@' . realpath(SITE_PATH . $path);
$url = 'https://api.weixin.qq.com/cgi-bin/media/upload?access_token=' . get_access_token();
$res = post_data($url, $param, true);
if (isset($res['errcode']) && $res['errcode'] != 0) {
$this->error(error_msg($res, '封面图上传'));
}
return $res['media_id'];
}
开发者ID:LukeChow1018,项目名称:weixin,代码行数:27,代码来源:WeixinMessageController.class.php
示例16: set_notice_data
/**
* set_notice_data
*
* @param $id string
* @param $field string
* @param $date string
* @param $value string
* @param $operation string
* @param $argument string
* @return string
*/
function set_notice_data($id, $field, $date, $value, $operation, $argument)
{
global $app_g_API_URL;
// Get page content
$postdata = http_build_query(array('action' => 'query', 'prop' => 'revisions', 'rvprop' => 'content', 'pageids' => $id, 'format' => 'json'));
$data = json_decode(file_get_contents($app_g_API_URL . "?" . $postdata))->{'query'}->{'pages'}->{$id};
if ($data->{'title'} == null) {
// This page doesn't exist -> WrongNotice
return "WrongNotice";
} else {
#echo json_encode($data)."<br />";
#return;
$content = $data->{'revisions'}[0]->{'*'};
if ($content == null || $content == "") {
// No content -> EmptyNotice
return "EmptyNotice ";
} else {
if ($operation == null || $operation == "") {
// No operation specified -> EmptyOperation
return "EmptyOperation";
} else {
if ($operation != "add" && $operation != "replace" && $operation != "delete") {
// Wrong operation -> WrongOperation
return "WrongOperation";
} else {
if ($field == null || $field == "") {
// No field -> EmptyField
return "EmptyField ";
} else {
// Split content into fields and values
$start_text = eregi_replace("^([^\\|]*).*\$", "\\1", $content);
$end_text = eregi_replace("^.*(}}[^}]*)\$", "\\1", $content);
$content = eregi_replace("^[^\\|]*", "", $content);
$content = eregi_replace("}}[^}]*\$", "", $content);
$content = eregi_replace("([^\n])\\|([^\n\\|=]*)=", "\\1\n|\\2=", $content);
$content = split("\n", $content);
$fields = array();
foreach ($content as &$i) {
$i = eregi_replace("^\\|", "", $i);
$f = eregi_replace("^([^=]*)=(.*)\$", "\\1", $i);
$v = eregi_replace("^([^=]*)=(.*)\$", "\\2", $i);
$fields[$f] = $v;
}
// Do whatever action must be done
if ($operation == "replace") {
if ($fields[$field] == "" || $fields[$field] == null) {
return "WrongField";
} else {
$fields[$field] = $value;
}
} else {
if ($operation == "add") {
if ($fields[$field] != "" && $fields[$field] != null) {
$fields[$field] .= ", " . $value;
} else {
$fields[$field] = $value;
upload_file($filename);
}
} else {
if ($operation == "delete") {
if ($fields[$field] == "" || $fields[$field] == null) {
return "WrongField";
} else {
unset($fields[$field]);
}
}
}
}
// Construct new content
$content = $start_text;
foreach ($fields as $key => $element) {
if ($key != "" && $key != null) {
$content .= "|" . $key . "=" . $element . "\n";
}
}
$content .= $end_text;
// Post new content
$postdata = http_build_query(array('action' => 'edit', 'pageid' => $id, 'format' => 'json', 'text' => $content, 'token' => get_token()));
$page = post_data($postdata);
return $page->{'edit'}->{'result'};
}
}
}
}
}
}
开发者ID:Atlasmuseum,项目名称:AM,代码行数:97,代码来源:API_SetNoticeData.php
示例17: htmlspecialchars
<?php
//header('Content-type: application/json');
require './../config.php';
require './../functions.php';
if ($_POST == null) {
exit;
}
if (post_data('adusername') != null and post_data('adpassword') == null) {
$user = htmlspecialchars($_POST['adusername']);
$total = count($DB->query("SELECT * FROM ad where user=?", array($user)));
if ($total == 1) {
$result = array('valid' => 'true');
} else {
$result = array('valid' => 'false');
}
} else {
$myusername = $_POST['adusername'];
$mypassword = $_POST['adpassword'];
$mypassword = MD5($mypassword . '404notfound');
$count = count($DB->query("SELECT * FROM ad WHERE user=? and pass=?", array($myusername, $mypassword)));
if ($count == 1) {
session_start();
$_SESSION['aduser'] = $myusername;
$_SESSION['adpass'] = $mypassword;
$result['message'] = "success";
// session_register("mypassword");
//header("location:userpanel.php");
} else {
$result['message'] = "errow";
}
开发者ID:zhangwen9229,项目名称:404-Not-Found,代码行数:31,代码来源:ajax.php
示例18: cbrobot_queues
function cbrobot_queues()
{
?>
<script type="text/javascript" src="<?php
bloginfo('wpurl');
?>
/wp-content/plugins/cbrobot/js/jquery.js"></script>
<script type="text/javascript" src="<?php
bloginfo('wpurl');
?>
/wp-content/plugins/cbrobot/js/jquery.validate.js"></script>
<?php
global $wpdb;
$options = unserialize(get_option("cbrobot_options"));
if ($_POST['cbrobot_create_queue_save']) {
$error = array();
$blog_id = $_POST['cbrobot_bg_id'];
$email = $_POST['cbrobot_bg_email'];
$password = $_POST['cbrobot_bg_password'];
$url = $_POST['cbrobot_bg_url'];
$asin = $_POST['cbrobot_aa_asin'];
if (!$blog_id) {
echo '<div class="error"><p>***กรุณากรอก Blog Id***</p></div>';
$error[] = "E_ID";
}
if (!$email) {
echo '<div class="error"><p>***กรุณากรอก Email***</p></div>';
$error[] = "E_EMAIL";
}
if (!$password) {
echo '<div class="error"><p>***กรุณากรอก Password***</p></div>';
$error[] = "E_PASSWORD";
}
if (!$url) {
echo '<div class="error"><p>***กรุณากรอก URL***</p></div>';
$error[] = "E_URL";
}
if (!$asin) {
echo '<div class="error"><p>***กรุณากรอก Asin***</p></div>';
$error[] = "E_ASIN";
}
if (count($error) == 0) {
require_once "lib/content.php";
require_once "lib/xmlrpc.php";
$param = array();
/* Load XML Template Config */
$config = simplexml_load_file(ABSPATH . "/wp-content/plugins/cbrobot/template.xml");
$title = base64_decode($config->title);
$content = base64_decode($config->content);
$client = new IXR_Client('http://www.channgamsim.com/xmlrpc.php');
$params = array(0, $options['cbrobot_username'], $options['cbrobot_password'], $options['cbrobot_aa_affkey'], $options['cbrobot_aa_apikey'], $options['cbrobot_aa_secretkey'], $asin);
if (!$client->query('demo.test', $params)) {
echo '<div class="error">***' . $client->getErrorCode() . ' : ' . $client->getErrorMessage() . '***</div>';
} else {
$obj_content = new Content();
$val = $client->message->params[0][Items][Item];
$title = $obj_content->getXML($val, $title, $keyword);
$content = $obj_content->getXML($val, $content, $keyword);
$title = Content::spin_content($title);
$content = Content::spin_content($content);
$sql = "INSERT INTO " . $wpdb->prefix . "cbrobot_queues (blog_id, blog_email, blog_password, blog_url, asin, title, content, queue_time)\r\n\t\t\t VALUES ('" . trim($blog_id) . "','" . trim($email) . "','" . trim($password) . "','" . trim($url) . "','" . trim($asin) . "',\r\n\t\t\t\t\t\t '" . trim(base64_encode($title)) . "','" . trim(base64_encode($content)) . "','" . time() . "');";
if ($result = $wpdb->query($sql)) {
echo '<div class="updated"><p>' . __('Insert Queue.', 'cbrobot') . '</p></div>';
} else {
echo '<div class="error">***Not Insert Data' . $result . '***</div>';
}
}
} else {
?>
<script type="text/javascript" >
$().ready(function() {
$("#cbrobot_bg_id").val('<?php
echo $blog_id;
?>
');
$("#cbrobot_bg_email").val('<?php
echo $email;
?>
');
$("#cbrobot_bg_password").val('<?php
echo $password;
?>
');
$("#cbrobot_bg_url").val('<?php
echo $url;
?>
');
$("#cbrobot_aa_asin").val('<?php
echo $asin;
?>
');
});
</script>
<?php
}
}
if ($_GET['postdata']) {
$id = $_GET['postdata'];
post_data($id);
}
//.........这里部分代码省略.........
开发者ID:pratikparmar111,项目名称:cblogger-robot,代码行数:101,代码来源:cbrobot.php
示例19: header
<?php
require_once '../../db.php';
header('Content-Type: application/json');
$fields = array('name', 'birthday', 'email', 'level');
$types = array('string', 'date', 'string', 'string');
$data = null;
switch ($_SERVER['REQUEST_METHOD']) {
case 'POST':
$data = post_data('learners', $fields, $types);
break;
case 'PUT':
if (isset($_REQUEST['id'])) {
$data = put_relations_data($_REQUEST['id'], 'relations', 'learner_id', 'teacher_id');
}
break;
case 'DELETE':
$data = delete_data('learners');
break;
default:
if (isset($_REQUEST['teacher_id'])) {
$data = get_data_by_relate_id('teachers', 'learners', 'teacher_id', 'learner_id', $_REQUEST['teacher_id']);
break;
}
$data = get_data('learners', array('id', 'name', 'birthday', 'email', 'level'), 'learner_id', 'teacher_id');
break;
}
if (is_null($data)) {
http_response_code(400);
die;
}
开发者ID:d42f,项目名称:s-eng,代码行数:31,代码来源:index.php
示例20: post_data
'ric' => 'CNCBRR=ECI',
'CF_YIELD' => 0.0,
'CF_CLOSE' => 0.0,
'CF_LAST' => 17.5,
'country' => '中国',
'title' => '中国存款准备金率',
'right' => 5
);
*/
#提交post数据
include_once 'post_data.php';
#print_r($re_list);
#($title, $before, $prediction, $result, $country, $rank=1)
if ('' != $re_list['GN_TXT16_4'] && '' != $re_list['SEC_ACT_1']) {
echo 'jim-test';
post_data($re_list['title'], $re_list['CTBTR_1'], $re_list['SEC_ACT_1'], $re_list['GN_TXT16_4'], $re_list['country'], $re_list['right']);
echo 'commit_net<br/>';
//print_r(post_data($re_list['title'], $re_list['HTS_CLOSE2'], $re_list['SEC_YLD_1'], $re_list['CF_LAST'], $re_list['country'], $re_list['right']));
}
file_put_contents('ric_index.log', ($ric_index + 1) % $max);
$r_url = REDIRECT_URL;
if ($ric_index < MAX_DATA_COUNT || 0 == $ric_index) {
sleep(10);
#$url = "http://bbs.lampbrother.net";
echo "<script language='javascript' \n type='text/javascript'>";
echo "window.location.href='{$r_url}'";
echo "</script>";
#header("location:http://localhost/sample_api/cnglod/redirect.php");
} else {
echo '跑结束';
}
开发者ID:jinjiacun123,项目名称:my_trkd,代码行数:31,代码来源:Quote.php
注:本文中的post_data函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论