秋霞韩国理伦电影在线观看hd,99re6这里只有精品地址,688欧美人禽杂交狂配,宝贝腿开大点我添添你视频男男

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

作者:網(wǎng)站建設(shè)公司 來源:佛山網(wǎng)站建設(shè)日期:2020-11-11 瀏覽: 次

網(wǎng)站建設(shè) - 建站教程 - 網(wǎng)頁設(shè)計(jì) - 微官網(wǎng)怎么制作,微網(wǎng)站設(shè)計(jì)圖解,微站建設(shè)方法

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

第一步:需要在微信公眾平臺(tái)上注冊一個(gè)自己的服務(wù)號(hào)或者訂閱號(hào)。

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

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

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

第五步:后,設(shè)計(jì)自己的微信官網(wǎng)。并且可在線預(yù)覽。

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

1、獲取access token

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

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

4、調(diào)用群發(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數(shù)據(jù)提交
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("文章標(biāo)題","文章內(nèi)容")->sendall();
企業(yè)網(wǎng)站建設(shè)一條龍
找零度飛易網(wǎng)絡(luò)公司-fslingdu所做php網(wǎng)站建設(shè)方案、網(wǎng)站設(shè)計(jì)、網(wǎng)站制作北京上海深圳龍崗衢州蘭州常州東營南通濟(jì)寧桂林淮安煙臺(tái)長春無錫天津昆山蘇州合肥洛陽昆明天津唐山泉州惠州萬州新鄉(xiāng)商丘臺(tái)州哈爾濱太原攝影???/strong>隨州學(xué)校商丘廣東湖南廣西江西海南廣州企業(yè)中小企業(yè)武漢南山羅湖福田虎門肇慶汕尾汕頭廣州佛山成都杭州濟(jì)南重慶福州西安廈門昆山沈陽青島徐州鄭州南京南寧長沙大連淄博石家莊南昌溫州珠海番禺順德三水高明中山東莞合肥江門嘉興西寧大良容桂倫教勒流陳村均安杏壇龍江樂從北滘祖廟石灣南莊等地區(qū)企業(yè)網(wǎng)站建設(shè)(廣告)公司提供專業(yè)做網(wǎng)站價(jià)格規(guī)劃書及營銷型網(wǎng)站制作,網(wǎng)站建設(shè)基礎(chǔ)知識(shí)

網(wǎng)站建設(shè)費(fèi)用

網(wǎng)站制作電話:137 1543 1176

網(wǎng)站開發(fā)QQ:378780108

E-mailsale@fslingdu.com如何制作網(wǎng)站QQ :378780108

網(wǎng)站建設(shè)服務(wù)

網(wǎng)站建設(shè)公司零度飛易是一家專業(yè)網(wǎng)站設(shè)計(jì),網(wǎng)站制作、seo優(yōu)化,網(wǎng)站推廣,網(wǎng)站建設(shè)的佛山網(wǎng)絡(luò)運(yùn)營公司。零度飛易在家具網(wǎng)站建設(shè)小家電網(wǎng)站建設(shè)、服裝網(wǎng)站建設(shè)電器網(wǎng)站建設(shè)、機(jī)械網(wǎng)站建設(shè)等行業(yè)的網(wǎng)站設(shè)計(jì)、網(wǎng)絡(luò)運(yùn)營都得到行業(yè)認(rèn)可,在上海、深圳、北京、廣州、佛山、中山東莞地區(qū)有著良好的口碑品牌的網(wǎng)站建設(shè)公司。我們的使命是打造創(chuàng)新型的網(wǎng)站建設(shè)企業(yè),能輕易地開展“互聯(lián)網(wǎng)+”業(yè)務(wù)、實(shí)現(xiàn)“互聯(lián)網(wǎng)+企業(yè)”的企業(yè)愿景。

Hi,Are you ready?

準(zhǔn)備好開始了嗎?
那就與我們?nèi)〉寐?lián)系吧

有一個(gè)互聯(lián)網(wǎng)項(xiàng)目想和我們談?wù)剢幔磕梢蕴顚懹疫叺谋砀?,讓我們了解您的?xiàng)目需求,這是一個(gè)良好的開始,我們將會(huì)盡快與你取得聯(lián)系。當(dāng)然也歡迎您給我們寫信或是打電話,讓我們聽到你的聲音!

零度飛易 互聯(lián)網(wǎng)整合營銷

地址:佛山市順德區(qū)大良鳳翔商業(yè)廣場二座670

業(yè)務(wù)QQ:378780108

策劃專線:13715431176

E-mail:sale@fslingdu.com

合作意向表

您需要的服務(wù)

現(xiàn)有網(wǎng)站改版
我需要做微信營銷
建設(shè)全新的企業(yè)網(wǎng)站
要找長期合作公司,需要年度服務(wù)
我需要做購物商城
我需要做系統(tǒng)平臺(tái)

您最關(guān)注的地方

對(duì)功能要求比較高
對(duì)設(shè)計(jì)創(chuàng)意要求比較高
需要可以購物支付
搜索引擎排名

價(jià)格預(yù)算

1-3萬3-5萬5-8萬8-10萬10萬以上大型項(xiàng)目需要招標(biāo)