亚洲AV永久无码精品放毛片,精品国产免费久久,成人午夜免费无码视频播放器,国产精品一区二区色欲AV

網(wǎng)站建設

結合設計經(jīng)驗與營(yíng)銷(xiāo)實(shí)踐,提供有價(jià)值的企業(yè)營(yíng)銷(xiāo)資訊

首頁(yè) > 新聞資訊 > 網(wǎng)站建設

微官網(wǎng)怎么制作,微網(wǎng)站設計圖解,微站建設方法

2015/10/3 11:26:00 來(lái)源:網(wǎng)站建設公司
內容摘要:深圳專(zhuān)業(yè)的網(wǎng)站建設公司,業(yè)務(wù)包含網(wǎng)站建設、網(wǎng)站設計、網(wǎng)站制作、網(wǎng)頁(yè)設計等服務(wù)的高端網(wǎng)站建設公司。為企業(yè)提供網(wǎng)站建設一站式服務(wù)。

近發(fā)現特別多的人在問(wèn)微網(wǎng)站是什么,微網(wǎng)站有什么用,微網(wǎng)站怎么做,微網(wǎng)站建設流程等問(wèn)題,今天,在這里為大家統一解答,希望能對各位愛(ài)學(xué)習人士有所幫助。

步:先,需要在微信公眾平臺上注冊一個(gè)自己的服務(wù)號或者訂閱號。



第二步:申請公眾賬號成功后,便可以使用其基本功能了,當然,要想做成自己的微信官網(wǎng),則需要進(jìn)入開(kāi)發(fā)模式,接入第三方接口。



第三步:注冊成功并登陸第三方接口,將注冊好的微信公眾號添加到第三方接口上,所需信息在微信公眾號設置下的賬號信息里。



第四步:添加公眾賬號后,連接公眾平臺與第三方接口,如圖:登錄微信公眾平臺,點(diǎn)擊左側下方的【開(kāi)發(fā)者中心】,點(diǎn)擊開(kāi)發(fā)模式。



第五步:后,設計自己的微信官網(wǎng)。并且可在線(xiàn)預覽。




完成以上步驟后,并且認證訂閱號或服務(wù)號后就可以做微信的二次開(kāi)發(fā)了,比如我要制作一個(gè)群發(fā)功能的接口,需要使用一下微信接口:

1、獲取access token

2、新增臨時(shí)素材接口

3、上傳圖文消息素材接口

4、調用群發(fā)接口

接口代碼示例:WeixinApi.class.php

<?php
class WeixinApi{
private $appid,$appsecret,$media_id;
public function __construct($appid="",$appsecret=""){
$this->appid=$appid;
$this->appsecret=$appsecret;
}

//獲取token
public function getToken(){
if($_COOKIE["exptime"]=="" || time()-$_COOKIE["create_time"]>=$_COOKIE["exptime"]){
$token=@file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$this->appid}&secret={$this->appsecret}");
$tokenarr=json_decode($token,true);
setcookie("exptime",$tokenarr["expires_in"],0,'/');
setcookie("access_token",$tokenarr["access_token"],0,'/');
setcookie("create_time",time(),0,'/');
}else{
$tokenarr=array(
"access_token"=>$_COOKIE["access_token"],
"expires_in"=>$_COOKIE["exptime"],
"create_time"=>$_COOKIE["create_time"]
);
}
return $tokenarr;
}

private function sockupload($phost,$pport,$purl,$filename,$file_data=array()){
$host = $phost;
$port = $pport;
$errno = '';
$errstr = '';
$timeout = 30;
$url = $purl;

/*$form_data = array(
'name' => 'lijie',
'gender' => 'man',
);*/

$file_data = array(
array(
'name' => 'media',
'filename' => $filename,
//'path' =>'1.jpg'
)
);

// create connect
$fp = fsockopen($host, $port, $errno, $errstr, $timeout);

if(!$fp){
return false;
}

// send request
srand((double)microtime()*1000000);
$boundary = "---------------------------".substr(md5(rand(0,32000)),0,10);

$data = "--$boundaryrn";

// form data
if(count($form_data)>0){
foreach($form_data as $key=>$val){
$data .= "Content-Disposition: form-data; name="".$key.""rn";
$data .= "Content-type:text/plainrnrn";
$data .= rawurlencode($val)."rn";
$data .= "--$boundaryrn";
}
}

// file data
if($filename!=""){
foreach($file_data as $file){
$data .= "Content-Disposition: form-data; name="".$file['name'].""; filename="".$file['filename'].""rn";
$pinfo=pathinfo($file['filename']);
$data .= "Content-Type: ".$pinfo["extension"]."rnrn";
$data .= implode("",file($file['filename']))."rn";
$data .= "--$boundaryrn";
}
}

$data .="--rnrn";

$out = "POST ${url} HTTP/1.1rn";
$out .= "Host:${host}rn";
$out .= "Content-type:multipart/form-data; boundary=$boundaryrn"; // multipart/form-data
$out .= "Content-length:".strlen($data)."rn";
$out .= "Connection:closernrn";
$out .= "${data}";

fputs($fp, $out);

// get response
$response = '';
while($row=fread($fp, 4096)){
$response .= $row;
}

$pos = strpos($response, "rnrn");
$response = substr($response, $pos+4);

return $response;
}

//json數據提交
private function jsonUpload($url,$jsdata){
$data_string = $jsdata;
$ch = curl_init();
curl_setopt ( $ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json;charset=utf-8',
'Content-Length: ' . strlen($data_string))
);

$result = curl_exec($ch);
curl_close ( $ch );
return $result;
}

//上傳媒體接口
public function upload($type,$filename){
$tokens=$this->getToken();
$result=$this->sockupload("api.weixin.qq.com",80,"/cgi-bin/media/upload?access_token=".$tokens["access_token"]."&type={$type}",$filename);
$media=json_decode($result,true);
$this->media_id=$media['media_id'];
return $this;
}

//上傳素材
public function uploadnews($title,$content,$author="",$url="",$digest="",$show_cover_pic="1"){
$articles=array(
"articles"=>array(
array(
"thumb_media_id"=>$this->media_id,
"author"=>$author,
"title"=>urlencode($title),
"content_source_url"=>$url,
"content"=>urlencode($content),
"digest"=>$digest,
"show_cover_pic"=>"1"
)
)
);

$tokens=$this->getToken();
$news=urldecode(json_encode($articles));
$result=$this->jsonUpload("api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=".$tokens["access_token"]."",$news);
$newsdata=json_decode($result,true);
$this->media_id=$newsdata["media_id"];
return $this;
}

//群發(fā)接口
public function sendall(){
$arr=array(
"filter"=>array("is_to_all"=>true,"group_id"=>""),
"mpnews"=>array("media_id"=>$this->media_id),
"msgtype"=>"mpnews"
);
$json=json_encode($arr);
$tokens=$this->getToken();
$result=$this->jsonUpload("api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=".$tokens["access_token"]."",$json);
return $result;
}

}

使用:

$weixin=new WeixinApi($appid,$appsecret);
$result=$weixin->upload("image","圖片路徑")->uploadnews("文章標題","文章內容")->sendall();

http://www.ezekroy.com/jianzhanzhishi/7731.html 微官網(wǎng)怎么制作,微網(wǎng)站設計圖解,微站建設方法

特別聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉載內容為主,如果涉及侵權請盡快告知,我們將會(huì )在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請聯(lián)系客服。電話(huà):0755-85297058;郵箱:2295772445#qq.com (#替換成@)。
QQ咨詢(xún)
微信咨詢(xún)
微信咨詢(xún)
電話(huà)咨詢(xún)
周一至周五 9:00-18:00
135-1055-3738
回頂部 久操黄色网站| 98噜噜噜在线观| 婷婷五月天www| 亚洲第一页视频偷拍视频| 国产欧洲在线| 狂野欧美性猛交blacked| 窝窝视频在线观看| 久久亚洲欧美国产| 国产欧美一区二区精品性色超碰| 国产一二三四区| 色久悠悠婷婷综合在线亚洲| 中文字幕巨乱亚洲| 一本一道无码中文字幕精品热| 美日韩中一级片| HEYZO无码国产精品粉嫩AV| 夜夜久网| 色哟在线| 欧美一区二区有限公司在线观看| 亚洲强迫网站在线观看| www色ww亚洲| 夜夜嗨AⅤ国产精品| 国内自拍网| 日韩AV无码免费播放| 99极品美女黄色| 蜜臀91精品国产观看| 亚洲少妇一二三区| 精品99一区| 精品无码久久久久国产婷婷| 欧美呦呦成人在线视频精选珍藏版 | 无码乱人伦一区二区亚洲第一| 欧美一区二区三区91| 色婷婷综合久久久久中文| 中文字幕bbw| 天天欲色| 五月激情综合| 99精品66| 自拍 日韩 欧美| 人人肏屄| 黄色视频在线观看你懂的| 日韩性无码| 亚洲欧洲成人精品av97|