Guest User

LCSP Level 1 : Session 6

a guest
Feb 26th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.87 KB | None | 0 0
  1. Session 7
  2. =========
  3. Introduction to web Architecture and Components
  4. -----------------------------------------------
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20. 1. Domain Name
  21. ---------------
  22. godaddy.com
  23. hostgator.com
  24. 2. Hosting Space
  25. ----------------
  26. 000webhost.com
  27. 3. Server
  28. ---------
  29. They are the applications or hardwares which are used to run other programs. server side programs. php script.
  30. It manages the request and response.
  31. When a user enters something in the url bar ---> a request is generated
  32. At the same time, when user receives the data -> a response is received
  33. Servers are again of 2 types:
  34. 1. MS OS Based server
  35. IIS --> Internet Information Services
  36. 2. Linux Based Servers
  37. Apache | Tomcat
  38. 4. Database
  39. -----------
  40. It is known as the backbone. It stores the data of the web site or the web application. It stores the data in a tabular way.
  41. Database --> Tables --> Columns --> Rows (Data)
  42. Database is again of two type:
  43. 1. MS OS --> MSSQL
  44. 2. Linux --> MySQL
  45. 5. Web Technologies
  46. -------------------
  47. These are the coding languages or scripting languages in which our web site or web application is biuld.
  48. They are also divided into 2 types
  49. 1. Client Side | Front End Scripting Language
  50. 2. Server Side | Back End Scripting Language
  51.  
  52. 1. Client Side Scripting
  53. These provides the UI to the web site or the web application. It is what a user sees on the web browser.
  54. These require just a browser to run.
  55. HTML
  56. 2. Server Side Scripting
  57. These are what works on back end. They require a server to run.
  58. PHP
  59.  
  60. MS OS --> ASP.NET
  61. Linux --> PHP
  62.  
  63. MS OS --> IIS + MSSQL + ASP.NET ---> Money
  64. Linux --> Apache|Tomcat + MySQL + php ---> Money
  65.  
  66. Local Hosting Server
  67. ====================
  68. By using these third party application for free, you can launch and host the application or the web site on the LAN and can run the testing for the same. There is no money involved, I can test the application for free.
  69.  
  70. 1. Windows Based Server --> WAMPP
  71. W --> Windows
  72. A --> Apache
  73. M --> MySQL
  74. P --> Perl
  75. P --> Php
  76.  
  77. 2. Linux Based Server --> LAMPP
  78. L --> Linux
  79. A --> Apache
  80. M --> MySQL
  81. P --> Perl
  82. P --> Php
  83.  
  84. 3. Cross Platform Based Server --> XAMPP
  85. X --> Cross Platform
  86. A --> Apache
  87. M --> MySQL
  88. P --> Perl
  89. P --> Php
  90.  
  91. After Installing XAMPP
  92. ======================
  93. 1. Apache
  94. 2. MySQL
  95. we need to start these two services.
  96.  
  97. How To Access XAMPP Server
  98. --------------------------
  99. There are 3 ways via which we can access the xampp server. Open the browser
  100. 1. localhost
  101. 2. 127.0.0.1
  102. 3. Hosted system's IP Address
  103.  
  104. Web Security Misconfigurations
  105. ------------------------------
  106. 1. If I do have a good firewall, I am secure.
  107. 2. If I do have a good IDS and IPS, I am secure.
  108. 3. If the web site of the web application is using HTTPS, I am secure.
  109.  
  110. HTML
  111. ====
  112. Hyper Text Markup Language
  113. --------------------------
  114. Front end developing language. which requires a browser to run.
  115.  
  116. 1. HTML --> Each and everything of the front end is written in this tag.
  117. <html>
  118. xxxxxx
  119. xxxxxx
  120. xxxxxx
  121. </html>
  122.  
  123. 2. Head --> Contains the meta data
  124. Links of styles, title, date etc etc
  125. <head>
  126. xxxxxx
  127. xxxxxx
  128. xxxxxx
  129. xxxxxx
  130. </head>
  131.  
  132. 3. title --> to provide the title to the tab
  133. <title>Name_Of_The_Title</title>
  134.  
  135. 4. Body --> Which contains the whole of the code of the web site and the web application. I works after the head is closed.
  136. <body>
  137. xxxxxx
  138. xxxxxx
  139. xxxxxx
  140. </body>
  141.  
  142. 5. Paragraph -->
  143. <p>.....
  144. ........
  145. ........
  146. ........
  147. </p>
  148.  
  149. 6. Break
  150. <br> --> It is single tag. It doesnot needed to close
  151. 7. Heading
  152. There are 6 types of heading tag
  153. h1
  154. h2
  155. h3
  156. h4
  157. h5
  158. h6
  159. as the number increases, the font size decreases.
  160.  
  161. 8. anchor --> to provide the hyper link to anything
  162. <a href="#">............</a>
  163.  
  164. 9. Image
  165. <img src=""></img>
  166.  
  167. 10. Form
  168. <form action="Kis page p redirect krna hai after clicking submit button" method="GET|POST">
  169. </form>
  170.  
  171. 11. Input
  172. <input type="text|number|date|password" id="Unique ID" name="Name Of the Element">
  173. 12. iframe
  174. <iframe src="http://www.lucideus.com"></iframe>
  175.  
  176. ==========
  177. pagee.html
  178. ==========
  179. <html>
  180. <head>
  181. <title>CII</title>
  182. </head>
  183. <body>
  184. <p>
  185. <h1>Grade 2<br>
  186. =======</h1>
  187. <h2>Session 1<br>
  188. ---------</h2>
  189. <a href="http://www.lucideus.com"><h3>Introduction To Cryptography</a><br>
  190. ----------------------------</h3>
  191. Cryptography --> Conversion of text into another form, which is readable but
  192. not understandable.
  193. <br>
  194. Conversion of plain text into an encrypted text via an algorithm which uses a
  195. key, after transmission, decryption of the encrypted text into the plain text
  196. via same algorithm and the key.
  197. <br>
  198.  
  199. Plain Text --> It is a normal Text, which is typed by the user. which is
  200. readable and understandable to everyone.<br>
  201. Cipher Text --> Encrypted text, which is the output of the encryption.<br>
  202. Encryption --> Process of converting plain text into a Cipher text, it is
  203. readable but not understandable<br>
  204. Decryption --> Reverse of encryption, conversion of Cipher text into a plain
  205. text<br>
  206. Algorithm --> It is the code which is used to encrypt and decrypt the plain
  207. text into cipher text and cipher text into plain text.<br>
  208. Key --> it is a special function, encryption and decryption is possible just
  209. due to this key. <br
  210. </p>
  211. <img src="naruto.jpg" height="700"></img>
  212. <form action="mera.html" method="GET">
  213. Username :<input type="text" id="uname"><br>
  214. Password :<input type="password" id="pass"><br>
  215. <input type="submit" id="but">
  216. </form>
  217. </body>
  218. </html>
  219.  
  220. =========
  221. mera.html
  222. =========
  223. <html>
  224. <head>
  225. <title>Second Page</title>
  226. </head>
  227. <body>
  228. <p>
  229. This is my second page</p>
  230. <iframe
  231. src="http://www.lucideus.com"></iframe><br>
  232. <img src="goku.jpg" height="500"></img>
  233. </body>
  234. </html>
  235.  
  236. PHP Basics
  237. ==========
  238. Server Side Scripting Language
  239.  
  240. <?php
  241. xxxx
  242. xxxx
  243. xxxx
  244. xxxx
  245. ?>
  246.  
  247. <?php ---> Start of PHP code
  248. ?> ---> End of php code
  249. echo "Hello Guys"
  250. $var --> var is name of variable
  251. $hack --> Hack is name of variable
  252. $ ---> used to declare a variable
  253. $_POST
  254. $_GET
  255.  
  256. =========
  257. CALL.html
  258. =========
  259.  
  260. <html>
  261. <head>
  262. <title>Calculator</title>
  263. </head>
  264. <body>
  265. <form action="calc.php" method="post" attribute="post">
  266. First Value : <input type="text" id="first" name="first"><br>
  267. Second Value : <input type="text" id="second" name="second"><br>
  268. <input type="radio"
  269. name="group1" id="add" value="add" checked="true">ADD<br>
  270. <input type="radio" name="group1" id="subtract" value="subtract">SUBTRACT<br>
  271. <button type="submit" id="answer" value="answer">Calculate</button>
  272. </form>
  273. </body>
  274. </html>Butt
  275.  
  276. ========
  277. calc.php
  278. ========
  279. <html>
  280. <head>
  281. <title>Jawab</title>
  282. </head>
  283. <body>
  284. <p>
  285.  
  286. <?php
  287. $first=$_POST['first'];
  288. $second = $_POST['second'];
  289. if($_POST['group1'] == 'add')
  290. {
  291. $ans=$first+$second;
  292. echo $ans;
  293. }
  294. if($_POST['group1'] == 'subtract')
  295. {
  296. $ans=$first-$second;
  297. echo $ans;
  298. }
  299. ?>
  300. </p>
  301. </body>
  302. </html>
Add Comment
Please, Sign In to add comment