You are on page 1of 22

1

Internet network

Internet = an network of networks

Internet network

The Internet is a global system of interconnected computer networks that interchange data by packet switching using the standardized Internet Protocol Suite (TCP/IP ! It is a "network of networks" that consists of millions of pri#ate and public$ academic$ business$ and go#ernment networks of local to global scope that are linked by copper wires$ fiber%optic cables$ wireless connections$ and other technologies! The Internet carries #arious information resources and ser#ices$ such as

electronic mail$ online chat$ #ideo and audio chat$ file transfer and file sharing$ IP telephony IP radio and tele#ision online gaming$ the inter%linked hyperte&t documents and other resources of the 'orld 'ide 'eb (''' !

History of the Internet - 1

1957 % The (SS) launches Sputnik$ the first artificial earth satellite! In response$ the (nited States forms the *d#anced )esearch Pro+ects *gency (ARPA within the ,epartment of ,efense to establish (S lead in science and technology applicable to the military! 1968 % *)P* awarded the ARPANET contract to -olt -eranek and .ewman (--. ! --. had selected a /oneywell minicomputer as the base on which they would build the switch! The physical network was constructed in 0121$ linking four nodes3 (ni#ersity of California at 4os *ngeles$ S)I (in Stanford $ (ni#ersity of California at Santa -arbara$ and (ni#ersity of (tah! The network was wired together #ia 56 7bps circuits! 1972 % The first e-mail program was created by )ay Tomlinson of --.! % The *d#anced )esearch Pro+ects *gency (*)P* was renamed The ,efense *d#anced )esearch Pro+ects *gency (or ,*)P*

History of the Internet - 2

1973 % ,e#elopment began on the protocol later to be called TCP/IP$ it was de#eloped by a group headed by 8inton Cerf from Stanford and -ob 7ahn from ,*)P*! This new protocol was to allow di#erse computer networks to interconnect and communicate with each other! 1974 % 9irst (se of term Internet by 8int Cerf and -ob 7ahn in paper on Transmission Control Protocol! 1976 % )obert :! :etcalfe de#elops Et ernet$ which allowed coa&ial cable to mo#e data e&tremely fast! This was a crucial component to the de#elopment of 4*.s! % The ,epartment of ,efense of (S* began to e&periment with the TCP/IP protocol and soon decided to re;uire it for use on *)P*.<T! 1983 % =n >anuary 0st$ e#ery machine connected to *)P*.<T had to use TCP/IP! TCP/IP became the core Internet protocol and replaced .CP entirely!

History of the Internet - 3

1983 % The (ni#ersity of 'isconsin created !omain Name "#$tem %!N"&! This allowed packets to be directed to a domain name$ which would be translated by the ser#er database into the corresponding IP number! This made it much easier for people to access other ser#ers$ because they no longer had to remember numbers! 1984 % The *)P*.<T was di#ided into two networks3 :I4.<T and *)P*.<T! :I4.<T was to ser#e the needs of the military and *)P*.<T to support the ad#anced research component$ ,epartment of ,efense continued to support both networks! 199' % Tim -erners%4ee and C<). in ?ene#a implements a hyperte&t system % (ir$t )T*+ % to pro#ide efficient information access to the members of the international high%energy physics community! 1992 % ,orl--,i-e ,e. released by C<).! 1993 % :arc *ndreessen$ .ational Center 9or Supercomputing *pplications (.CS* and the (ni#ersity of Illinois de#elops a graphical user interface to the '''$ called " *o$ai/ (or 0@!

History of the Internet - 4

1994 % Silicon ?raphics founder >im Clark collaborated with :arc *ndreessen to found :osaic Communications (later renamed to Net$/ape Communications! ! 1994 % ,a#id 9ilo and >erry Aang create AahooB! AahooB began as a student hobby and e#ol#ed into a global brand that has changed the way people communicate with each other$ find and access information and purchase things 1994 >eff -ezos founded *mazon!com$ Inc! in 011C$ and launched it online in 0115 as an on%line bookstore! 1996 % ?oogle began as a research pro+ect by 4arry Page$ a Ph!,! student at Stanford

History of the Internet - review


1957 % ARPA! 1968 % ARPANET! 1972 % e-mail program1 !ARPA 1973 % TCP/IP 1974 % Internet 1976 D Et ernet1 TCP/IP implement in ARPANET 1983 % TCP/IP .e/ame t e /ore Internet proto/ol1 !N" 1984 % ARPANET 2a$ -i3i-e- in *I+NET an- ARPANET 199' % (ir$t )T*+ 1992 % ,orl--,i-e ,e. 1993 % *o$ai/ (or 0 - (ir$t 2e. .or2$er 1994 % Net$/ape! 1994 % 4a oo51 Ama6on7/om $ 1996 % 8oogle

Simplified Web Architecture

Internet or intranet networks TCP/IP ,E9 Client Web Browsers Internet <&plorer :ozila 9irefo& ?oolge Chrome *pple Safari =pera .etscape Comunicator :RI A-re$$/)ea-er http3//www!rsebaa!l#/inde&!html ,e. "er3er Web Servers % *pache % IIS (Internet Information Ser#ice % Personal 'eb Ser#er !!!!

,E9 Page E!html /T:4$ CSS$>a#a Script$ >Script$ 8-Script Image >a#a *pplet *cti#eF 9lash$ :o#ie$ *udio

ener!li"ed Web #odel


Internet or intranet ,E9 Client
% Internet <&plorer % :ozila 9irefo& % ?oolge Chrome % *pple Safari % =pera % .etscape Comunicator

,e. "er3er :RI A-re$$/)ea-er


% *pache % IIS (Internet Information Ser#ice % Personal 'eb Ser#er

,E9 Page E>e/=t e appli/ation

Ser#er side
Ta.le re$pon$e
% PosgreSI4 % Interbase % d-ase %H

,E9 page
,inamical generated

,e. Apli/ation !ata.a$e


%:ySI4 -=racle -SI4 Ser#er - 9irebird Programming language % P/P % Perl % *SP %H % >a#a % CGG % ,elphi

";+ <=er#

$%&' I&

TCP/IP $tan-$ (or Tran$mi$$ion Control Proto/ol / Internet Proto/ol TCP/IP is the communication protocol for the Internet! * communication protocol is a description of the rules computers must follow to communicate with each other! The Internet communication protocol defines the rules for computer communication o#er the Internet!
/iding inside the TCP/IP standard there are a number of protocols for handling data communication3

TCP (Transmission Control Protocol communication between applications (,P ((ser ,atagram Protocol simple communication between applications IP (Internet Protocol communication between computers IC:P (Internet Control :essage Protocol for errors and statistics ,/CP (,ynamic /ost Configuration Protocol for dynamic addressing

I& Addresses

Ea/ /omp=ter m=$t a3e an IP a--re$$ .e(ore it /an /onne/t to t e Internet7 This is an IP address3 192716871'712' TCP/IP uses JK bits$ or C numbers between 6 and K55 separated by a period to address a computer! Ea/ /omp=ter m=$t a3e a =ni<=e 4 n=m.er a--re$$ in to a IP net2or?555 IP address e&ample

In Internet3 01J!KJ6!K6C!0L In a local network3 1927168!6!M @localhostN3 0KM!6!6!0

(om!in ) !mes

IP address (0K digit numbers are hard to remember! (sing a name is easier! .ames used for TCP/IP addresses are called domain names! 3iae>pert7ro is a domain name for 2'8798731725'! 'hen you address a web site like http3//www!#iae&pert!ro$ the name is translated to a IP number by a ,.S process (,omain .ame Ser#er ! *ll o#er the world$ a large number of ,.S ser#ers are connected to the Internet! ,.S ser#ers are responsible for translating domain names into TCP/IP addresses and update each other with new domain names! 'hen a new domain name is registered together with a TCP/IP address$ ,.S ser#ers all o#er the world are updated with this information! To register a domain name from 4at#ia use 2227ni/7l3

*+I - *niform +esource Identifier

In computing$ a (niform )esource Identifier (()I is a compact string of characters used to identify or name a resource on the Internet! The main purpose of this identification is to enable interaction with representations of the resource o#er a network$ typically the 'orld 'ide 'eb$ using specific protocols! ()Is are defined in schemes defining a specific synta& and associated protocols! * ()I may be classified as a locator (()4 or a name ((). $ or both!

*+, - *niform +esource ,oc!tor

(niform )esource 4ocator is an ()I which also specifies where the identified resource is a#ailable and the protocol for retrie#ing it! In popular usage and many technical documents$ it is often confused as a synonym for (niform )esource Identifier (()I $ which are not re;uired to specify how to locate the resource! "#nta> o( :R+@ protocol://domain/path?query_string#section:port protocol3 http$ https ( web $ ftp$ sftp (file sharing $ H (when is http is not re;uired domain3 IP or ,.S ( re;uired in any situation path3 folder path separated by @/N ( when is index.html or another default file is not re;uired ;ueryOstring3 assigned operations separate by @PN ( re;uired when is re;uested

asigned operation sinta&3 variable=value

section3 section name in page

*+, - *niform +esource ,oc!tor - -.!mple


www!#iae&pert!ro % only domain is using L2!0K5!0LC!0KK % only domain is using http3//L2!0K5!0LC!0KK e;i#alent with http3//www!#iae&pert!ro % use protocolGdomain http3//www!#iae&pert!ro/album/inde&!php % use protocolGdomainGpath http3//www!#iae&pert!ro/Qe&tpg=curs!php % use protocolGdomainGpathG;ueryOstring http3//en!wikipedia!org/wiki/4at#ia % use protocolGdomainGpath http3//www!google!ro/searchQhl=roP;=4at#ia % use protocolGdomainGpathG;ueryOstring http3//en!wikipedia!org/wiki/4at#iaRPrehistory % use protocolGdomainGpathGsection ftp3//popescu!home!ro3K0% use protocolGdomainGport

*+) - *niform +esource ) !me

* (niform )esource .ame ((). is a (niform )esource Identifier (()I that uses the urn scheme$ and does not imply a#ailability of the identified resource! -oth ().s (names and ()4s (locators are ()Is$ and a particular ()I may be a name and a locator at the same time! * (). is like a personSs name$ while a ()4 is like their street address! The (). defines somethingSs identity$ while the ()4 pro#ides a method for finding something! <ssentially$ "what" #s! "where"! "#nta> o( :RN@ <URN> ::= !urn:! <N"#> !:! <N$$> .I,3 .amespace Identifier .SS3 .amespace Specific String

*+) - *niform +esource ) !me - -.!mple

urn3isbn36C50C565KJ

The (). for "The 4ast (nicorn"$ identified by its book number! The (). for "Spider%:an (film "$ identified by its audio#isual number! The (). for the "Science of Computer Programming" +ournal$ identified by its serial number!

urn3isan36666%6666%1<51%6666%=%6666%6666%K

urn3issn3602M%2CKJ

10

H$#, / Hyper$e.t #!rkup ,!n0u!0e

/T:4 is the predominant markup language for 'eb pages! It pro#ides a means to describe the structure of te&t%based information in a document T by denoting certain te&t as links$ headings$ paragraphs$ lists$ and so on T and to supplement that te&t with interacti#e forms$ embedded images$ and other ob+ects! /T:4 is written in the form of tags$ surrounded by angle brackets! /T:4 can also describe$ to some degree$ the appearance and semantics of a document$ and can include embedded scripting language code (such as >a#aScript which can affect the beha#ior of 'eb browsers and other /T:4 processors! 9iles and ()4s containing /T:4 often ha#e a !html filename e&tension!

H$#, / $!0s

/T:4 tags are used to mark%up /T:4 elements /T:4 tags are surrounded by the two characters U and V The surrounding characters are called angle brackets /T:4 tags normally come in pairs like UbV and U/bV The first tag in a pair is the start tag$ the second tag is the end tag The te&t between the start and end tags is the element content /T:4 tags are not case sensiti#e$ UbV means the same as U-V

11

H$#, / -lements synt!.

<TAG parameters>elements contents</TAG>


start tag end tag

<&ample W <title>My first webpage</title> <font color=blue>Text with blue fonts</title> <img src=picture !pg" height=#$ wi%th=&>

H$#, / -.!mple
<html> <hea%> <title>'elcome to (at)ia</title> </hea%> <bo%y bgcolor=cyan> This is my first homepage <b>This text is bol%</b> </bo%y> </html> This is an /T:4 element3 <b>This text is bol%</b>

12

H$#, / He!din0s
/eadings are defined with the Uh0V to Uh2V tags! Uh0V defines the largest heading! Uh2V defines the smallest heading! <h#>This <h*>This <h+>This <h,>This <h&>This <h->This is is is is is is a a a a a a hea%ing hea%ing hea%ing hea%ing hea%ing hea%ing one</h#> two</h*> three</h+> four</h,> fi)e</h&> six</h->

H$#, / &!r!0r!ph !nd line bre!k


Paragraphs are defined with the UpV tag! <p>This is a paragraph</p> <p>This is another paragraph</p> /T:4 automatically adds an e&tra blank line before and after a paragraph! Line Breaks The UbrV tag is used when you want to break a line$ but donSt want to start a new paragraph! The UbrV tag forces a line break where#er you place it! <p>This <br> is a para<br>graph with line brea.s</p> An% this is a bor%er <hr>

13

H$#, / im!0e
In /T:4$ images are defined with the UimgV tag! The UimgV tag is empty$ which means that it contains attributes only and it has no closing tag! The synta& of defining an image3
<img src=/url to image> or0 if you set %imension of image <img src=/url to image wi%th=wi%th" height=height">

<&ample
<img src=http1//www rigalat)ia net/images/riga2%ome2church2+$$ !pg" >

H$#, / hyperlink
/T:4 uses the UaV (anchor tag to create a link to another document! *n anchor can point to any resource on the 'eb3 an /T:4 page$ an image$ a sound file$ a mo#ie$ etc! The synta& of creating an anchor3
<a href=/url/>Text0 image0 etc to be %isplaye% </a> <&ample <a href=http1//google com/> 3n!oy whit google</a><br><hr><br> <a href=http1//mail yahoo com/> <img src=http1//www net4 ser)ice info/terminal/global/5ahooMail png"></a>

14

%SS / %!sc!din0 Style Sheets


Styles define how to display /T:4 elements Synta&3

selector 6property1 )alue7 property1 )alue7 89 D using in /T:4 style element or in CSS file @property1 )alue7 property1 )alue7 8N D using in /T:4 style parameter

<&ample by using in /T:4 style element

<hea%><style>p 6text4align1center7 color1re%9

</style></hea%>

<&ample by using in /T:4 style parameter

<p style=:text4align1center7color1re%;>/ello worldU/pV

&H& / 0ener!l inform!tion


P/P % stands for P/P3 /yperte&t Preprocessor P/P is a powerful ser#er%side scripting language for creating dynamic and interacti#e websites! P/P is a ser#er%side scripting language$ like *SP P/P scripts are e&ecuted on the ser#er P/P supports many databases (:ySI4$ Informi&$ =racle$ Sybase$ PostgreSI4$ ?eneric =,-C$ etc! P/P is an open source software and is free to download and use P/P files may contain te&t$ /T:4 tags and scripts P/P files are returned to the browser as plain /T:4 or other mime type P/P files ha#e a file e&tension of "!php"$ "!phpJ"$ or "!phtml"

15

&H& / how it work1

Ser#er side
P/P Interpreter
P/P script /T:4 script

P/P Program (script <<php echo 'elcome to worl% of =>="7 <>

'<- browser I nternet <&plorer$ 9irefo&

'elcome to world of P/P

&H& / e.!mple 1 / simple output


<<php echo echo echo echo echo <>

:simple text;7 <>#>>ea%ing # type<>#>"7 *$$?7 +@, "7 +@,7

16

&H& / e.!mple 2 / perimeter !nd !re! c!lcul!tion


<<php Awi%th=#$7 Alength=#*7 Aperimeter=*BAwi%th@*BAlength7 Aperimetrul=*BCAwi%th@AlengthD7 Aarea=Awi%thBAlength7 echo "=erimeter is Aperimeter <br>"7 echo "Area is Aarea"7 <>

&H& / e.!mple 3 / use *+I v!ri!ble


()I client re;uest3
http1//www )iaexpert ro/pc/test# php<name==opescuGage=*+ Hand test0!php file (published in pc folder on the ser#er #iae&pert!ro

<<php echo 'elcome /7 echo A2G3TE/name/F7 echo /<br>5ou are /7 echo A2G3TEage/F7 echo / years ol%/7 <> )eturn thisH

17

&H& / I2--,S- decision structure


The if construct is one of the most important features of many languages$ P/P included! It allows for conditional e&ecution of code fragments! Synta&3 if CexprD statement53J else statementHI <&ample 0 <<php if CAa > AbD echo /a is bigger than b/7 <> <&ample K <<php if CAa > AbD 6 echo /a is bigger than b/7 9 else 6 echo /a is HIT bigger than b/7 9

&H& / 23+ loops structure


9or loops are the most comple& loops in P/P! Synta&3 for Cexpr#7 expr*7 expr+D statement The first e&pression (e&pr0 is e#aluated (e&ecuted once unconditionally at the beginning of the loop! In the beginning of each iteration$ e&prK is e#aluated! If it e#aluates to T)(<$ the loop continues and the nested statement(s are e&ecuted! If it e#aluates to 9*4S<$ the e&ecution of the loop ends! *t the end of each iteration$ e&prJ is e#aluated (e&ecuted ! <&ample 0 for CAi = #7 Ai <= #$7 Ai@@D 6echo Ai79 //return #*+,&-K?L#$ <&ample K <<php Asum=$7 for CAi = #7 Ai <= #$7 Ai@@D6 Asum=Asum@#7 9 echo Asum7 //return && C#@*@ <>

@#$D

18

(!t!b!ses

* Computer ,atabase is a structured collection of records or data that is stored in a computer system! The structure is achie#ed by organizing the data according to a database model! The model in most common use today is the relational model! * computer database relies upon software to organize the storage of data! This software is known as a database management system (,-:S ! *#";+ is most using relational ,-:S from '<-!

+el!tion!l d!t!b!ses - components

19

S4, - Structured 4uery ,!n0u!0e


SI4 lets you access and manipulate databases SI4 is an *.SI (*merican .ational Standards Institute standard

SI4

!!+ - !ata -e(inition lang=age

!*+ - !ata manip=lation lang=age

CREATE1 A+TER1 !RAP1 B+:") !ATA9A"E1 TA9+E1 TRI88ER1 et/

IN"ERT1 :P!ATE1 !E+ETE1 "E+ECT re/or-$

S4, - (#,

In$ert /oman- $#nta>


"N$%R& "N&' table_name [(column1, column2, )] ()*U%$ +value,,- value,.- /0- +value.,- value..- /0- /

E>ample

insert into agenda +1ode- 2Name- *Name- )ge- 3hone0 values + NU**-4$abau4-4#umitru4-45,4-6789:5;< ..8:<;=40

"ele/t $impli(ie- /oman- $#nta>


SELECT columns FROM table_name [WHERE condition] [ORDER ! column1 ["SC#DESC], column2 ["SC#DESC], ]

E>ample

select > ?rom agenda select 2Name- *Name- 3hone ?rom agenda select 2Name- )ge ?rom agenda @here )ge >= .=

20

&H& functions from connection to #yS4, d!t!b!se

=pens or reuses a connection to a :ySI4 ser#er mysql_connect+Aip or dns serverB- AuserB- Apass@ordB0C Sets the current acti#e database on the ser#er! mysql_connect+AdatabaseB0C Sends an uni;ue SI4 ;uery to the currently acti#e database on the ser#er! This function return a table (result set #ariable when is a select ;uery! Dtable=mysql_query+A$E* queryB0C )etrie#es the number of rows from a table (result set ! Dro@snumber=mysql_num_ro@s+Dtable0C :o#es the internal row pointer of the :ySI4 result table! )ow number start with 6X mysql_data_seeF+Dtable- Dro@_number0C :o#es the internal row pointer of the :ySI4 result table! )ow number start with 6X Dro@=mysql_?etch_array+Dtable0C <&tracting data from an row arrayX Ddata=Dro@GA?ield_nameBHC

&H& connection to #yS4, d!t!b!se - -.!mple


E>ample 1 C in$ert a per$on in ta.le agen-a mysql_connect+A,I.:,;J:,:.B- ArootB- Apass@ordB0C mysql_connect+AmydatabaseB0C mysql_query+Ainsert into agenda +1ode- 2Name- *Name- )ge- 3hone0 values + NU**-4$abau4-4#umitru4-45,4-6789:5;< ..8:<;=60 B0C E>ample 2 C ret=rn all Bname (rom ta.le agen-a1 $eparate- .# /omma7 mysql_connect+A,I.:,;J:,:.B- ArootB- Apass@ordB0C mysql_connect+AmydatabaseB0C Dtable = mysql_query+A$%*%1& > 2R'K agendaB0C ?or+Di=9C Di<mysql_num_ro@s+Dtable0C Di770 mysql_data_seeF+Dtable- Di0C Dro@=mysql_?etch_array+Dtable0C echo Dro@GA2NameBHC echo A-BC L

21

+eferences

Internet -o/=mentation http://@@@:@5schools:com/ http://@@@:@5:org/ http://@@@:php:net/docs:php http://dev:mysql:com/doc/ http://en:@iFipedia:org/@iFi/"nternet Program -o2nloa-ing 0A*PP %/ontaining Apa/ e $er3er1 *#";+ -ata.a$e $er3er1 P)P interpreter1 et/ & http://@@@:apache?riends:org/

*ag=ma "t=-io +ig t %/ontaining P)P e-itor& http://@@@:so?tpedia:com/get/3rogramming/2ile M%ditors/KagumaM $tudioM*ightM?orM3N3:shtml ";+#og %/ontaining *#";+ manager an- a-min tool& http://@@@:@ebyog:com/en/do@nloads:php

22

You might also like