You are on page 1of 266

Vol.

5.0

Vol.2

Vol.3

Vol.4

Vol.5

Vol.6

Vol.7

api
Vol.8
SAE
SAE
SAE

Vol.9

SAE

Vol.10

SAE

Vol.11

Vol.12

Vol.13

SAE
ZTalk
Vol.14-Vol.17

ZTalk mm
17
Vol.18

Vol.19

Vol.1

1 qq qq

2 5
3

4
500

http://mp.weixin.qq.com

qq
qq
so


1
2

40

http://mp.weixin.qq.com
QQ
qq

Vol.2

CMS

1.

2. 7 =
-
3. 7

4.
3 26
Hello2BizUser
subscribe
7
execl

1.

2.

3.

4.

50

ajax

URL
Lday=3
day
y=10

10

1.

op
penid

20

2.

3.

4.

5.

6.

"[]"

20
0

URL

co
ount
cou
unt=20

100

1.

2.

+
3.

4. check

ZTalk 15000
URL
pagesizepagesize=10
14000 ctrl+f

Vol.3
2013-04-03

1.

2.

3.

4.

1.

2.

ZTalk 13

3.

ZTalk

4.
120
ZTalk wifi

5.

6.

ZTalk
1
2
3
4 500-1000

7.

ZTalk

8.

ZTalk

9.

1.

icon

2.

icon icon

3.
7 8
4.


bmp, png, jpeg, jpg,
gif2M
ZTalk 1GIF 2
error

mp3, wma, wav, amr 5M


60s
rm, rmvb, wmv, avi, mpg, mpeg, mp4
20M
ZTalk

1.

60S

2. icon

1.

2.

0
3.

ZTalk

4.

5.

ZTalk 6 10

ZTalk


mphelper

anywhere

Vol.4
2013-04-10

BiaNewsbianews8

1.

2.

3.

1.

2.
300

1.
2.
3.

4.
5.
300

6.

ZTalk

bianews

1.

2.

3. 24

1.

2.

1.
5
2.

Vol.5

--

XXXX
XXXX
XXXX XXXX

100

HiHello

dirls

1
1
300 300 p2

p2p2
P2

111
11

212
12

312
13

13
60%


NB

TAG TAG

pv
ZTalk IDEA

ZTalkfenng
safari URL

ebsorg),

ZTalk1
12306

ZTalk

ZTalk N
H5

ZTalk
ZTalk error

ZTalk weixinxiaoshuo
nbc

ZTalk VVM

Klaus and Kinski Susto de Muerte

===== ZTalk@=====

ZTalk

Vol.6
2013-04-15

p2 P2

YY

ipad

ipad 6000-8000
ipad
IDEA ipad

1.

2.
+

3.

200
5

weixin.fm
--------ZTalk ---------

ZTalk

loy

:-)
ZTalk
hw

"GuessSong"""

ZTalkGreat idea

20 VIP
ZTalk ZTalk VIP

ZTalk VVM
Priscilla Ahn City Lights


2013-04-04

1.
2. 4 3
5 3

3.

4.

5.

1.

2.

APP H5
APP

IBM app

APP

APP

NB

1
2 1

3 5

Vol.7
2013-04-27

ZTalk ZTalk

2WeMedia
51316

10

1.

2. api
SDK SDKSoftware Development Kit

3.

api

api

XML web
XML
html

ToUserName ID

FromUserName OPENID
OPENID

CreateTime

MsgType text

Content

MsgId ID

MsgType image

PicUrl

LBS

MsgType location

Location_XLocation_YScale

Label

MsgType link

Title

Description

Url

MsgType voice

MediaId id

Format amrspeexwav speex

MsgType video

MediaId id

ThumbMediaId id

MsgType event

Eventsubscribe()unsubscribe()CLICK(
)

EventKey KEY
KEY

3 26

ToUserName OPENID
OPENID

FromUserName ID

CreateTime

MsgType text

Content 2048

FuncFlag 1

MsgType image

MediaId id

1MB JPG

MsgType voice

MediaId id

1MB 60s AMR

MsgType video

MediaId id

ThumbMediaId id80*80 id

10MB MP4
64KB JPG

MsgType music

Title

Description

MusicUrl MP3WMVAAC

HQMusicUrlWIFI

MsgType news

ArticleCount 10

Articles item item


item

Title

Description

PicUrl JPGPNG 640*320


80*80

Url

https://api.weixin.qq.com/cgi-bin/user/info

subscribe 0
openid
nickname
sex 1 2
city
language zh_CN

media_idmedia_id

http://api.weixin.qq.com/cgi-bin/media/upload

typeimagevoicevideo
thumb
media_id
created_at

media_id

http://api.weixin.qq.com/cgi-bin/media/get

https://api.weixin.qq.com/cgi-bin/user/get

total
count OPENID 10000
dataOPENID
next_openid

--------------------------------------

Vol.8
2013-05-03

ZTalk

-------------------- ZTalk SAE BAE

SAE X

Sina App Engine SAE


Web

http://sae.sina.com.cn/ SAE

SAE

SAE

1
+SAE
SAE

1.

2.

3. SAE

4.

5.

SAE

REG+ 13810928931

SAE
500 SAE

ZTalk

SAE 100
1

SAE ZTalk 300


3

1
100

200

5
1

2
2000

3 2

SAE http://cloudbbs.org/forum.php
5

10,000 /15,000 /
30,000 / SAE ZTalk

SAE

50

SAE

SAE

1.
ZTalk ztalk.sinaapp.com

2.

3.

4. php
PHP

5. web

SAE
SAE

SVN

10 1-10


weixincourse.sinaapp.com

SAE editplus

1.

2.

3.

4.
URL

5.

6.

Hello World

Hello, world"Hello,world
hello world
hello world TEST
hello world

hello.php1
2php .php

php

1. php <?php ?>


php

2.

3. PHP ;

4. echo php

5. php

hello.php URL

+/hello.php
SAE SAE
PHP

http://www.w3school.com.cn/php/index.asp

--------ZTalk --------miya

ZTalk
Format amr

voice format amr


mp3

Vol.9
2013-05-04

SAE
Vol.6

SAE SAE

SAE

wx_sample.php SDK
wx_interface.php
1.php2
++34
index.phpweixin.phpadmin.php

SAE
SAE

6 define your token


7 SAE

define("TOKEN", "weixin")

define TOKEN
weixin

PS

$
67 $token
TOKEN
define

3
123456

1. SAE ++ SDK

http://weixincourse.sinaapp.com/wx_interface.php
http://
SDK .php

2. SDK 123456

1.
token

2.
Vol.7

3.

SAE
SO

echostr

SAE
wx_tpl.php

SDK
SDK

3 include_once php
wx_tpl.php

6 XML
php
$GLOBALS['HTTP_RAW_POST_DATA']$postStr

php php
$Q1 $q1

9 empty 0
1not 0 1 1
0$postStr
39

PS:
1php &&||
!

2 if...else..php if(){
}else{} else if( 1){
}elseif( 2){}else{}()
{},

12 simplexml_load_string() XML
$postObj

14 $postObj OPENID
$fromUsername ->

16 $postObj ID $toUsername

18 $postObj $form_MsgType

21

php ===
=

24
subscribeunsubscribe

29 32

29

30
\n
echo "\"";

31 sprintf
$textTpl wx_tpl.php
$fromUsername, $toUsername, time(), $msgType, $contentStr
%s$resultStr

<xml>
<ToUserName><![CDATA[$fromUsername]]></ToUserName>
<FromUserName><![CDATA[$toUsername,]]></FromUserName>
<CreateTime>time()</CreateTime>
<MsgType><![CDATA[$msgType]]></MsgType>
<Content><![CDATA[$contentStr]]></Content>
<FuncFlag>0</FuncFlag>
</xml>
PS:time() php Unix
1970 1 1 00:00:00

32

33 php exit

http://weinxincourse.b0.upaiyun.com/lesson1.zip
SAE
UTF-8

Vol.10
2013-05-05

UGC UGC

4 10 3
1

SAE

PicUrl

SAE Storage SAE


SAE
Storage

Storage Storage

Storage

domain

1.
2.

3. URL

4. 6
5.

1.

2.

3.
10G

1. FTP

2. Storage

3. pic

jpg png

+
+

URL

SAE
100M

SAE
29 31

/*.....*/

30

$resultStr
sprintf

34 MsgType news

35 ArticleCount
5

ArticleCount 1 2

36 </Articles>

PS php .echo "A"."B"; AB

$resultStr =.
$resultStr=$resultStr.....$resultStr
$resultStr

<item>...</item>

41

42

43
640*320 80*80

44

ZTalk

76

77
0

78

ZTalk

16

SAE Storage

87 Storage $s

88 Storage $s->write(
)

Storage test.txt

XML

"get_post"

Storage test.txt
get_post SAE

"subscribe"
subscribe

PC PC

ZTalk

Vol.11
2013-05-08

GMIC SHOW

HOST SAEBAE

TAE

super TV


60 LED
6999

6999
40 1999

vivo Xplay

3D vivo Xplay

vivo Xplay 5.7


1300 iphone
HI-FI

ROM

wemeida

12

5
5
ZTalk

SAE


20 41

21

24
$form_Content

PStrim php

26 9
empty($form_Content)$form_Content 0
1(!)0 1

28 31
$form_Content

34 37
""

$form_Content

200

29 41

30
=

33 $return_str
\n

34

0lc.\n
[]$return_arr[0]lc.
\n

35 implode $return_arr
$return_str
"\n\nlc.\nhb.\nsk.\nwp.
\nml.\nrc.\ntp."

implode implode()

42 51
ArticleCount 10 10

8 10

53 105 $return_arr 10

10

107 foreach
$return_arr
$value$value
$value=$return_arr[0]
$value=$return_arr[1]

$value $return_arr

$value[0]$value[1]$value[2]
$resultStr

116
10


60

SO

SAE Storage

3729

MP3AAC

124
[]

127 music

128 137 wx_tpl.php sprintf

ZTalk

10
Storage

Storage bq.txt

ZTalk

Vol.12
2013-05-13

--------ZTalk ---------

OS

OS

1 OS

2 htc

OS
linux

3 yunos
OS

4 Android

5 ROM Linux Windows


ROM ROM

-----------------

fenng

6
PS

ZTalk

11

ID ID
PicUrl

20 $form_MsgType==image;

24 $from_PicUrl;

26
OPENID+ jpg

JPG

28 SAE SaeFetchurl
PHP
curl file_get_contents

30 fetch()
$from_PicUrl$res;

32 errno() 0

35 Storage

37 ($res)
$filename, Storage weixincourse
Storage

39 41

45 48

37

Storage
SAE Storage

APP LBS
SoLoMo

X Y

api
API URL

21 location

24 27
Location_X Location_Y
Scale Label

29 API URL

31
wgs84 GPS

33

35 API URL++
$map_api_url.$map_coord_type URL+
location=,

URL URL HTTP://


=

URL
&

http://api.map.baidu.com/geocoder
coord_type location

37 $geocoder

CITY

40 $geocoder
<city></city>$city
city $city[1][0]
$city[0][0]<city></city>

41 $city[1][0] str_replace
$citystr_replace
str_replace(,,);

$city

43 API URL

45 iconv()$city UTF-8
GBK urlencode URL
URL &city=

GBK UTF-8

PSGBK GB2312 ANSI ANSI


Unicode
UTF-8

46 0 1

49 $weather

51

strstr $weather Weather&&


Weather

Weather

XML

citystatus2-status1
temperature2-temperature1direction2-power2
chy_shuomingsavedate_weather

54 62

64 71 1 2
2
$w_status 2
1 $w_status $w_status

73 81
$weather_res=array();

82 implode()"\n"

73 82 .

2000

unsubscribe

300 unsubscribe
subscribe

303 Storage

305 OPENID.txt

Storage

soanyway

ZTalk

Vol.13

1
2
3

SAE


XML

SAE MySQL MySQL


MySQL

MySQL MySQL
SAE

MySQL

MySQL

XLS

1.
2. MySQL
3. SAE

4.

MySQL SAE PHPMyAdmin


MySQL

SAE

CPU

ZTalk

2000 V 2000
2000
2 20 6

SAE Memcache

Memcache

MC

Memcache 10M
Memcache
10M

1.

2. Memcache
3. Memcache
4. 24
50%

5.

6. KEY

7. KEY
GET
8.
Memcache

ZTalk
SAE Storage
CDN

ZTalk

ZTalk

http://www.upyun.com/


1
2 SAE

API

1000M

SAE
FTPFTP
FTP

1 FTP

1. FTP 4

2. FTP
3. a.txt
+/1.txt

Vol.14


1.
2.
3.
4.
5.
6.

12

ZTalk

Vol.15

14
QQ

13 SAE SAE
MySQL


roster

OPENID

10

10

50

15

15

0 1

50

30

openid

50

1 1 -1
2

1 1 0

15 15 3
15

1.
++

2.

TINYINT-128 127
0 255

SMALLINT-32768 32767
0 65535

MEDIUMINT-8388608
8388607 0 16777215

INT-2147483648
2147483647 0 4294967295
UNIX

CHAR
255
255 CHAR
VARCHAR

TEXT 65535

DATETIME'1000-01-01
00:00:00''9999-12-31 23:59:59'MySQL 'YYYY-MM-DD
HH:MM:SS' DATETIME

DATE'1000-01-01''9999-12-31'MySQL
'YYYY-MM-DD' DATE

3.
5
45 10
30

4.

5.

6.

7.

8.

9.

10
10 11

10.

11.

12. MyISAMMEMORY InnoDB


MyISAM

13.

utf8_general_ci UTF-8

wx.qq.com ZTalk

SQL

SQL

1.
2.

1 2

3.
4.
roster_id

5.
6.
7.

20

1 1 0

class


app_weixincourse
utf-8

Vol.16

100

SQL

ALTER TABLE `roster` ADD `roster_title` CHAR( 20 ) NOT NULL COMMENT '
' AFTER `roster_name`

roster

sae SAE

base-class.php

3.1

class_add.php

HTML

url
ID

1-6 html 4
utf-8 5
Keyword Description
SEO

PSHTML HTML (HTML tag)HTML


<html> <b> </b>

7 html <body><body></body>

9 php

10 base-class.php

13 sae
sae mysql

16 URL class_id intval


class_id intval(class_id)=0
class_id 1 intval(class_id)=1 class_id abc12
intval(class_id)=0

PS GET POST URL

19 action

2021 action action


un_script_code js un_html html

24 class_id 0 class_id

26 class_id sae
mysql getLine mysql
$mysql$mysql->getLine sql

select

*
from
class class
where
class_id=$class_idclass_id $class_id
$class_value

27 class_id=$class_id !$class_value

29 JS <script> js alert
alert("")history.back();

35 $action update

38 44
$old_class_id url class_id
input
$old_class_id url class_id

46 time() 10
date

48 $old_class_id

5152 sql
update
class class
set
class_name='$class_name',
class_fid='$class_fid',
edittime='$nowtime'
where class_id=$old_class_id class_id $class_id

sql

53 sql runSql

5859 sql
insert into
class class
(class_name,class_fid,addtime,edittime,status)

values
('$class_name', '$class_fid','$nowtime','$nowtime',1)

63 runSql $mysql>errno() 0

65

70 location= JS
url class_add.php
class_id=$old_class_id

76
getDatasql
select
class_name,class_id ID
from
class class
where
status=1

order by class_fid asc ID order by


class_fidasc

80 HTML H3
/a
href a

82 action
URLmethod
post get post get
url name id
enctype multipart/form-data

83 p

84 input

type text file


button submit hide

name
38 44

value

87 98 select
name

option value option


value

option selected

value 0

76 $class_list
$class_list foreach

94
ID ID
selected$class_select<option>

?:; if(){}else{}

102103 action class_id


class_id value url

105

/class_add.php,

class_manager.php

16

25 34
ID
1 0 status 0

35 55

38
mysql getVar
sql
select
COUNT(*)
from
class class
where status=1

count(*)

40

43 2
10 20

45 0

47 10
0-9 0 10-19
ID

49 sql
class_fid class_fid
SQL

select
A.class_id,A.class_name, A
B.class_name as fclass_name B fclass_name
from
class A left join class B class A class
B
on A.class_fid=B.class_id A class_fid B
class_id
where A.status=1 A

order by A.class_id desc A


limit $from_record,$page_num $from_record $page_num

54 multi base-class.php

url

61 border=1

62 64 <tr><td> xls

66

68 80 $class_list
sql
URL+

90

56
12

SAE
SAE +
+

1
Vol.15 weixincourse.txt

2 wx_interface.php

3 SAE

base-class.php

class_add.php

class_manager.php

roster_add.php 118 Storage

roster_manager.php

detail.php

list.php

wx_tpl.php

wx_interface.php

5CSS

roster_add.php
input file

roster_pic
$_FILES$_GET $_POST

97 $_FILES['roster_pic']['name']

103 105

107 111

118 Storage
$old_roster_pic

1web
$_FILES['roster_pic']['tmp_name']

2$old_roster_pic

$old_roster_pic
$old_roster_pic $old_roster_pic

Vol.15

wx_interface.php

OPENID OPENID
OPENID

OPENID URL
URL WAP

593 check_user$fromUsername
OPENID

598 OPENID
roster_openid OPENID

600 609

check_user

BD

memcache
BD_0

memcache Vol.13
memcache

memcache
$mc->set(, , 0, );

memcache
$mc->get();

memcache
memcache $fromUsername."_do"
$fromUsername."_data"$fromUsername

memcache
$last_do
memcache

BD_1

||
BD_2

$last_do
list
$roster_name,$roster_number,$roster_mp

roster_openid openid
$fromUsername openid roster_openid

help

PS exit exit

memcache

memcache

HELP XM
BMGH


detail ID URL

ZTalk
memcache

memcache
null || 1 null
1

ID
ID

null $from_content

ID
ID 0

3
5

$last_data explode ||
$last_data[0]$last_data[1]

4
+

ceil
ceil(5/4)=2 1.25
1
memcache memcache
||2


EXIT HELP

weixin.fm

--------ZTalk ---------

KB24
mm ~

Ztalk

Ztalk

Ztalk

Ztalk

ZTalk VVM

Crash City Saints Broke

Vol.18
2013-07-11 ZTalk@

ZTalk 1000
10

PC

1 wx_interface.php

2 SAE
3
base-class.php
wx_tpl.php

question_manager.php
question_add.php
wx_interface.php
Vol.15.txt

question_add.php
textarea

N
N

Mysql

wx_interface.php

17

9 GO

N serialize
OPENID_question_data

setp_1

go

2 question_order
$now_order

6 best history 10


weixincourse

ZTalk DIY

phpexcel XLS

ZTalk VVM
catie mckinney for the light

Vol.19
5.0
ZTalk WeMedia

PC

1make_menu.php Appid
AppSecret SAE

2interface.php
3
Vol.4

token

access_token

access_token
ID

url token Appid AppSecret


ID id

memcache curl ID
token

token
100 token
token curl Appid
AppSecret tokencurl_setopt curl_exec

json json_decode
token token

access_token
POST

button

2~3

sub_button

2~5

type

click

name

16 40

key

click

KEY (event ) 128

json

curl get post


$menu
make_menu.php
Appid AppSecret

JS

click

click

4-5 8-10

textarea,

urlencode json unicode


json_encode urldecode

[button]-[main_menu]-[sub_menu]
button
make_menu
$mk_menu=new make_menu();
$mk_menu->del_menu();
$mk_menu->create_new_menu($menu);
get_menu() del_menu()

event
subscribe unsubscribe
CLICK
CLICK
EventKey

wemedia

weixin.fm

ZTalk VVM
Club 8 The Girl With the Northern Soul Collection

You might also like