f) 111~.

J llt

1uUotJ 1~a ttl;(l-!

Traffy"

ilfllnll (.

mowl'UTlllo"Ill1n"N

,fa'''''')

~

http:! '4$q.oornl~pOt
(0 ~1!II'n,.ff1!"l1<!)

(ii"..,.,}ihl""",,

"'ltJ);J/~.mmI~ Oj5l.00rndlo~,.,q,"~'lMi"N

A'--.. m\lllUbmw
"'V WTI ....

7 Iftn.;fltJ'D" ~n'lldl

(n"1fllW)O)ol~

'1.r"' .... ~,.".""m>OJ

mllIlrnqu'h.~Mh-llI"NlII'

"' ....Ii.~JI""IOP,.uh

bmw

1.I'IUl'lS1IJYI l

to

~

nUl:lft'lVS

5

.. '"

I ~ ...
':::rExp

oi,utl'.'ll''I'lft (Prachanukoon ressway)

U'~'f1U~,)lU

(Saphan Khwai)
25-00-20.10 00:32

• '::::w:,
N

\.;1Ft., ."IJ,

A

Ff,1_' -\'\I '"', \

W ·'tS"iill

""1

.... A'W."i''l

t~i:l~<i..,~

.,,,;;;- niL\J'i=--"'~~" :in
tm~aC_ll":;l)ltC~ ~.''5:

l"'u~-'i::;-a'='·t1'~··-~Y1Ii-OIll"'·.

'l".n",

11

r~~::""

l'I"~

11~ -~

~""yu~<;"'I'in

<;-rtJt

VI;

l.Iuw u, nu nu,,,wnA 'i{u..nnlAZlilUA •••
• y ..

nUU "lc,ryaihn.JF1 "l' n

i1:::l'nUl'4:'i·~'IJJ 7

lJUc:j'iJU'UililU¥'h
\.iU'
v

i1:.:vnuc

JJIGl.. Vis::iJ.ulnin

c:::

~'·n,h,,-;-~u Duwa
~-, ....

l.I.J

....

(,n&A)u:w,:DlI'1l1D;)oih ~ 'n.G'\I.~Au$.}m5 \ll1'~'W"l\l ~. ul=IJ'h_ ·l1ui'.~nQA "IlID,J1hDa~'I.ll'l~.nlJ. 8 ~ \'0 .miiD
ifo,\t1Anm"i'l1~O"Ia:'1.I

Applied on your web & application (7)
m dtJ
d~ ~ fl (911cfji uu b~ubb~ ~ bb'El J~ ~hVi)it!(7) t

· getRainForecast

..... 0".. r ---~-.~;~--~,

.

· format (XM L) · type(1=latlng,2=area,3=road)
· location
- <G@l-or cast>

!I!ft.)ASIAN INSTITUTE OF TECHNOLOGY
"~.".

<In pUP"Oli tI}"4'n.1< Inpm>
-<ODtput~ <repcrt

<rep0r110C3r,ioD=~'=Im..\lt:I ~(. i: ,. n1"m'lJl\lUFl1"".id=·-110·r3.in=~O"'sr:IIUs=M ]'1,nrJ,· > <reportloca tion=" (1\1 "01(0) '$n,- nH \ In.,, 1HOO)':"" id;;·266·raiD=~ ~ slatus:" t u£lr~ \. ,. > g O <report IO(,3rion="{ll~Ul1 ':I(or:S'nf H~\1\UI l'A"'Zid=~1316~ rai-n:"O" 5 I"3fils=· ·uiirlu· > n <reportloc3riOD;~~U\lnnl!)J 'Ol ~n"i n1',JmwnnUfI,." cid,=· .. O...6·r.3iD;:::~O· status="lJ1i'irlu· > 1 lim(>_st3mp,>:::!OIO-lO-:::!S 1-1.2-. S ·Ci02"'<. tim _sla.mp"> emu. m">O<m3X'rJio'>

'locarion="':ICI)"Sn1" ::ar..'~ns n.,-,,H vnun

·mAf~ aid=·1663~l'3,iD=·O~SI'3.tU="" hllidtl"" ::-

,nfl',

- <incident> - <record> < title >li'll.l El'Ul1 <It!ith~ >

<tyipe >lht~n'VI'd"l'</type> <desc> 'i1u~tLiluGl1hl'</desc> <report> tin th11Util1 </report> < rphone > uJail\lt'i","vnl11'tl" r.:I', tJ"lU '1hl </rpho ne> <so urce > L-.\1,'1.1 "'ll11( a.",i'fosm, 'U~lft1) /sou ree > a ( < <begin> L'la,v1Lnft"Lill'),</begin> <end> L,)fnihn'lifui{61 </ end> <ttl>1~tJ1:lL'lalV1thliit,J"aQ</ttl > </record> <lincident>

Applied on your web & application (9)
m dtJ
d~ ~ fl (911cfji uu b~ubb~ ~ bb'ElhfIJ ~ bVi)il~ (9) t
<1xml ve rion=" 1 . 0 If enooding='''UIF -8" <'gpa> <record> <vehicle_id>OOOOOOOl</vehicle_id> <gps_timestamp>2010-12-27 17:03:51</gps_timestamp> <latitude>13.740378</latitude> <longitude>lOO,534919</longitude> <speed>O.2</speed> <he ading>5<1 heading> <altitude>-5</altitude> <O!::ganiz a tion _source >tester<1 organizat ion _ source>
-cvehe cl e_type >taxi< /vehe ele _type.>

<taxi_passenger_flag>O</t:axi_passenger_flag> <gpsdata_valid_::lag>l</gpsdata_valid_flag>
<numbe.r_of_satellites>3</number_of_sa.tellites>

\1

lJIJ1.I

.,ujuu::

0",,\1

U1'ii'il3-!A'Cil" ~~,:'dAa£J,a~nilu ,.l\.pplicationtu3i,ci1,tI
TraffyAPI

SiUD In
0$

lJsername : • Fast: fl1~ 1 'lh11'U'VI'j"161l'i'l • Free: 1>i.J1'U'l~

..

Password :
d . ,:

l\'Gl.m~oiVlU1

~\lh

Act_Yale E-mail

Activale

SMS code

AIlPIO

1fDlJ~ Account
Username : Password:

..

I

fhJ.,DUPassword:

.------------,1 * __.I * __.I *
.
L._ L._

I!

nffin;J'fIlJflL-n'fl~iffl:rl flru ~ ~
ActivateEmaii Activate SMS

o

I)

.... ~~ n~ru.1 nS21 fl2Ifll:J"iVll,,1 U Lwu
-

'U11Ui'h1~ : Ut1lil1.h~'1f1'lf'U :

,-------------,li:

,-------------.>!I:

I

sernam.e :

Password .:

"iil'IJiltiil;)Appbtloo

W~eEJ

\11'1f API
1M:.
Af>plOa_ UI'!!, \V.I:I mll'lQn l:J'1I1l11 ",,,,,'."¢oo Iln:p_ " ..... U!I!I'J.·.. Ch'.. Web!loW Ih,_ ~lmw')1>< 'I;':iI~", D' mU41'1!'W h<'!ptl'1JjJ

•«;;'0-"" .., Ii'" 1h.tI~~" • ,«tin ...... ""'., m'tt>iVII'A~IIOnI1ll~

"IIl;i", .\\'''ll>,,''!1~,,~

"'""M~

In,; 7

t1nlJnl'tlD<l,l,hUfl111. ~A!lntl'~ Fi nl:t11:J" lU

WcbA~1O!I

B

.n,__

,~-".t~~
It

~lIniiiai~~"'_,,~'lAiH;:I, ~-.N;'I""'_"""'hI'"",~

.'I,!,"'~.:«ttdb:t"il.".,

~~'~~~".J'~4n:t
~l""

""I-,",4.;",~1I,,,,~~q."Ih
.... ,~~~"t-" ...

W__ ~\'l.to;'.~_'w:.

..,t.I

Reftrrer

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I> <B\'aUable>[<Iavllllable>
-<urI>

bup:llalhen8.traffy in.thlapislserviceslweerapalfimagecctv.pbp?id= <Iurl> <lastupdate>201O-OS· 23 II :56.:03<1lastupdate>
<Src>noorcc</sJ'C>

I59&:num.=O&appid:=

&key=

<deW>
-<lis!>

Iimagoocrv.php?id=159&num=4&:appid=
<lUst>

hllp:l/alhcna:tra.tfy .in.lhlapislservicesJwoorapallima,gcccrv .pbP?id= I 59&num:Q&appid::l: & key=: .bnp:lIathena.1faffy .i!l:thlapislscrviocslwoorapat runageoetv.php?id= 159&num~1 &appid= &kcy= JlUp:ltalb.ena.lraffyln.tblapisisorvieeslwoorapatlimagccctv ~pbp?id=159&num=2&appid=& key=. ',hltp:flalhena .traffy.in .lhlapisiserviceslwecrapaUimagocctv ..php?id= I 59&num=3&appid=' : &key=: ',hI Ip.:l/alhena:l.raffy .in ,thlapislserviceslweerapat

.&kcy=:

-

·pbp?id= I59&num.=O&appid:=

& key:::

& key=: ,bnp:lIathena.1faffy m:!.hIapislscrviocslwoorapat ,hup:llal.bena,lraffyln,tblapisisorvieeslwoorapatlimagCCC(v ~pbp?id=159&num=2&appid:. & key=, ,hltp:llalhena ,ttaffy,in .lhlapisiserviceslwecrapaUimagocctv ..php?id= I 59&num=3&appid=' : &'key=: ',hI Ip.:l/al.hena:l.raffy .in ,thlapislserviceslweerapat Iimagoocrv.php?id=159&num=4&:appid=' ,&kcy=: <lUst>

. id= I59&num:Q&appid::l:

I 59&num.=O&appid:=

& key:::

I59&num:Q&appid::l: & key=: ,bnp:lIathena.1faffy m:!.hIapislscrviocslwoorapat ,hup:llal.bena.lraffyln.tblapisisorvieeslwoorapatlimagCCC(v ~pbp?id=159&num=2&appid:. & key=. ,hltp:llalhena .ttaffy.in .lhlapisiservicesfwoorapaUimagocctv ..php?id= I 59&num=3&appid=' : &'key=: ',hI Ip.:l/al.hena:l.raffy .in.thlapislserviceslweerapat Iimagoocrv.php?id=159&num=4&:appid=' .&ker-: <lUst>

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~I OO.61294r I> <B\'aUable>[<Iavllllable>
-<urI>

bup:llalhen8.traffy in.llIJ~ID1s.ISe['VlC:es <Iud> <lastupdate>201O-OS· 23 11·::l·[]:U:"I<lIJ~Ul <Src>noorcc</sJ'C> <deW>
-<lis!>

&key=

hllp:l/alhcllura.tfy.in. .. & key=: ,bnp:lIathenuraffy.in:!.hIapislscrviocslwoorapat runageoetv.php?id= 159&num~1 &appid::: .tblapisisorvieeslwoorapatlimagCCC(v~pbp?id=159&num=2&appid:. & key=. ',hltp!flalhena .traffy.in .lhlapisiservioosfwecrapaUimagoccfv ..php?id= I59&num=3&appid=' : &'key=: ',hIIp.:l/alhena:l.raffy .in.thlapislserviceslweerapat Iimagoocrv.php?id=159&num=4&:appid=' .&ker-: <lUst>

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I>

I 59&num.=O&appid:=

&key=

I 59&num:Q&appid::l: & key=: ,bnp:lIathena.1faffy m:!.hIapislscrviocslwoorapat ,hup:llal.bena.lraffyln.tblapisisorvieeslwoorapatlimagCCC(v ~pbp?id=159&num=2&appid:.
key=. Iimagoocrv.php?id=159&num=4&:app.id= <lUst> ..php?id= I 59&num=3&appid=' :&'key=:

& ',hIIp.:l/alhena:l.raffy .in.thlapislserviceslweerapat

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I> <B\'aUable>£</avaJ!able>
-<urI>

&key=

& key=: Iimagooclv.php?id=159&num=4&app.id='
<lUst> key=.

,bnp:lIathena.1faffy m:!.hIapislscrviocslwoorapat
~pbp?id=159&num=2&appid:. & ',hIIp.:l/alhena:l.raffy .in.thlapislserviceslweerapat

,hup:llal.bena.lraffyln.tblapisisorvieeslwoorapatlimagCCC(v ..php?id= I59&num=3&appid=' : &'key=:

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I> <B\'aUable>[<Iavllllable>
-<urI>

bup:llalhen8.traffy in.thlapislserviceslweerapalfimagecctv.pbp?id= <Iurl>

I59&:num.=O&appid:=

&key=

I 59&num:Q&appid::l: & key=: ,bnp:lIathena.1faffy m:thlapislscrviocslwoorapat ,hup:llal.bena.lraffyln.tblapisisorvieeslwoorapatlimagCCC(v ~pbp?id=159&num=2&appid:. & IUI(I,J;;;'"""'\ .• php?id= I59&num=3&appid=' :&'key=: ',hIIp.:l/alhena:l.raffy .in.thlapislserviceslweerapat

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I> <B\'aUable>[<Iavllllable>
-<urI>

bup:llalhen8.traffy in.thlapislserviceslweerapalfimagecctv.pbp?id= <Iurl> <lastupdate>201O-OS· 23 11·:J·[):U~I<I.u:lSn]mune.> <Src>noorcc</sJ'C> <deW>
-<lis!>

I59&:num.=O&appid:=

&key=

,bnp:lIathena.1faffy m:thlapislscrviocslwoorapat ~le(~~'oor:apa!111m~gcCC(v~pbp?id=159&num=2&appid:. & ',hIIp.:l/alhena:l.raffy .ill.thlapislserviceslweerapat

<cctv 0.0:::"159- namee" Anusomsatan Ex:il.~name_th=·'n1~

<poInt lat:::" I j .9406S·lng= ~l(X"61294r I> <B\'aUable>[<Iavllllable>
-<urI>

bup:llalhen8.traffy in.thlapislserviceslweerapalfimagecctv.pbp?id= <Iurl> <lastupdate>201O-OS· 23 II :56.:03<1lastupdate>

I59&:num.=O&appid:=

&key=

<Src>noorcc</sJ'C>
<deW>
-<lis!>

h up :l/alhcllura.tfy.in ... runageoetv.php?id= 159&llum~1 &appid= key=. ',hltp!flalhena .traffy.in .

.bnp:lIathena.1faffy m:thlapislscrviocslwoorapat w""oor:apall1unagc.CC(v~pbp?id=159&num=2&appid:. & ',hI Ip.:l/alhena:l.raffy .in ,thlapislserviceslweerapat

Iimagoocrv.php?id=159&num=4&:appid='
<lUst>

.. S..st:IMR['

SERVER..NA:\.£'J:

$open .... http://ot'l\eno.troUy.tn,,thlop{,/Ol)h''ofiy.ptIp?fo''"'''t.)Nl&opl-get\'MS&lr(,dtJ1.-,~tght..zeele'l'

• orroy( 'method'

'http'

*'" or~oy(
"
,

..:>' " ,posy-

'hcack!r'.,>

·occept~\ol"OlJUClgC!: \r\n· ~

"HOSt: Shostv\n'" "Referer:

.
http-nfeN!r

http://~st\r\n''.//Settll'l!lelW

..Content.- Type: oppl tCDt iOtlh:-_-fOI'l!'l-urlencode6\t'\n,' "Con t,oot·l«lgth; llV\n\r\n"
·l1Se~od08.~nt~N'T\r\n" ) •

Scontext .. stl"ea"' contexLcreouCShdfS.): .. opI"'($open '.
'1"'"

fo\$t.

Scon,t~t):,

.. fp:ls~thl'l.«Sfp);

•method , => "POST" 'header
I",,,

I

'"·accept -languQg.e :en\r\ni· . .

'''Host :Snost\r\n·

"Referier:http://Sl1ost\r\n".

II SetHng the http-referer
.

"Content-Type :app 1icati.on!x. -\'l'I\W- fonn-ur lell.coded\r\n· PCorttent·length: 33\r\n\r\n" ,
"userno.me~kCldo&GarmentlOC()MENf\r\n'1
)

· 11 ti~

· ... stl"'eam_contex· _create(Shdrs); - fopen(Sopen, ;;; fpassthru(Sfp);
I

r", fal se .Scont.ext)

.

tpt t~"tt>;t/jlMls(ript~~ \0"1 s."Q(! r){ Lf(:!it .. "no"){ dox. ~nt, II'I'tE I ""Byrd(' $h'), , r'tffM..." : lels~{ ~e"t '.' str, }p\ t("'"); docu!\eJ'l\, gttEl_t~Id(' sII'), t _MID!!. .. '<i~

td 'sll"

~1l'(; .. "'

te t [00] 'r.'

t(l]' ""pt rcrot cenrest ion..

id--sh" .. <I'dl...,. 4~1C'n ~·s,~tll\ S ..Cl9ttOft_~ ~.f,f!lKtf'd1~) (thl <option w\uC'w"no")15I:11<1OPI;\_

il1b-

,YG\UII")"~

$doc .. M:W ((MJecu

"'~();

Sdo(·)lO<l4('http ;/1_

.tt-orry .In. W-.rtnVtes
"VIIS" ):

~\vnl..P'1P'

);

S_I'd\"bre .. SdOX- tEl~~say ~ S~\Ht ... ': r-ch( SSl!OrchKOde m. SstGtCl\'iIode ) {

S_lurl
Sud..

.. 1s~rch.'tode.>o"tHf'l'I"'!'I· SyT~(
$Jo;II Iu r 1."H ~C""(eo) -) 'lCdrVo' ~;

urI" );

5.11'$ • ~rc;hNoclIe-'>vel' I _.,t <!)oT 5ps .. S"'lp~.-..lte-(e)·"~"oll,o<'; S:lflle-tt - '«lptilXl wlu~"' .Surl. ", ", Sp,s,.'.,.·

.s-. '.uQPtI_';,

$searchNode

'" Sdoc->getEleme"tsByTagName(

Sselect "" ""; forea,ch( SsearichNode as $searchN'ode )
{

"vms

n

};

Snam.e "" Sse·archNode->getAttri.bute('name Sxmlurl

th');

Surl

=

$xmlurl->l.tem(0)->nodeVallJej

=SsearchNode->gedlementsByTagName(

"url" );
"pstop" );

Sxmlps "" SsearchNode->getElementsByTagName( Sps .. $xmlps->item(0)->nodeValue;

Sselect.=

'<option

value ..." .Surl .. tJu,Sps ...' ">' .Sname ..'<loptlon> ' n

-ese teet onchotlge-"shaA( this. opt iOl1s(thi s. se l.ectedlndex] <Opt. ion, va lue."'no">I.;aon<lopt.ion>
<?pl'\p

•value)" >

Sdoc .. ne>'i:~nt:O; Sdoc-> load( 'http;/IwHN.troffy
SseorchHode

..in.th/-..lil'ee/test/test:s'how<:Ipivms.php'
"vms" );

);

Sselect _'''';
{

.. Sooc->ge.:ElementsByTogName(
CIS

foreach(Ssearclllo.:ode

$searcode

)

Soome .. SSl?orchl'k>de->getAttribute("!"IOl'!!e. th');

Sxmlur1. ., Ssearc~e->eetElementsByTo9"

Surl .. Sxmlurl-Ht.em(0)->nodeValue:

:e(

-lIrl" );
"ipstop" );

$XII!lps .. $seard'ltlode~>getElementsByTllgNcvne( Sps -S>Urilps->ll~(0)->rIOdeValue; Sselect
} echo $os-elect; 7> <lselecb

.• •<Opti.on value "", SurL "II" .sps. ' "s ' .SI'ltUH!.' <loptiotl>

'j

~Dao Kanong. Ranlp .~Dao Kanonq-Suksawat
'.
! ~

:.

Suksawat Ramp
-------

, .~Exat(Satupradit)

~ Exit to EXAT 2 .
Ii-

·I River Ramp
~~, i!l1!!1'" ,'" '!!!!l!!! ~~""~!. !l1!!l]!il1!!(~!il1
~,"[,!!).!!l

!!!I'!!' ~ ~!ilI !iI.~'!!i !!!,t!!i ,!ill", ~ ~ i!l!ill ,.,'" I~ '!!i '!!i

'j!,

i!!:~!!!i ~ I!i 'I! I!!!~

'ii,

,~,!!!!!ill!! ~~ '''''~ '!!!!!!i' ~~'" !

II! I. ,!! ~ ~!!!i, ""!!,"

'i!!l!!I ~ Ii!!'Ii!!!

i!l''')

ge1tlRallnldlom_. Ikey( appid).:
login_ ur1-ur1lib.ur1openC·http://apLtraffy.in.th/ apis/getKey.php 1a,ppid=%s'!Hiappid) sedionkey=login _ur1.read0 login_ur1.close()
If(e .ullWliU

sectionkey

sedionkey=getRandom _key(appid)

kl.-md5.newC~"%(appid, k2=md5.new(~,,%(key, passkey ~~,,%(kl,k2)

random,key)).hexdigestO randomkey)).hexdigest()

http://athena. ..raffy.. n.. h/apis/a,pitraffy .. hp?formatXMl t it p
, &available=t&api=getCClV&key-xx&a'ppid·.-xx

Application

D Request

CCTV

1

url-urlUb.urtopen(lhtt.:p:/lapi..raffy-in .. h/a.pis/apitraffy.php?fo.nnat .CSV8tavailaibl t t
, e=t&ap,i=getCC1V,&key=%s&a .. ppid=%sI%(passkey,appid))

c:sv=login_urI..ead 0 r csv= unicode(csv,IrUTF~")
login_url ... close()
IPt:lt~·lunmcsv

Sign up to vote on this title
UsefulNot useful