Skip to content

Commit 60ad80a

Browse files
authored
Initials
1 parent 74513a9 commit 60ad80a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1533
-0
lines changed

Diff for: 1) Building Web Applications in PHP/README.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Building-Web-Applications-in-PHP-solutions
2+
This contains all the important links and references that Coursera provided in the entire 8-week course
3+
4+
# HyperText Transfer Protocol (HTTP) & Request/Response Cycle: (Week - 1)
5+
6+
GET Request Page: http://data.pr4e.org/page1.htm
7+
Response Page : http://data.pr4e.org/page2.htm
8+
HTTP: http://www.w3.org/Protocols/rfc2616/rfc2616.txt
9+
What happens on clicking a link: https://www.youtube.com/watch?v=keo0dglCj7I
10+
11+
# Entire HTML data is there in the Week 2 - HTML file
12+
13+
# Cascading Styles Sheets (Week - 3)
14+
CSS Advanced Colors: http://www.w3schools.com/css/css_colors.asp
15+
Image Sample Code: http://www.wa4e.com/code/css/images.htm
16+
HTML Colors: http://www.w3schools.com/html/html_colors.asp
17+
18+
CSS Cheat Sheet: http://www.lesliefranke.com/files/reference/csscheatsheet.html
19+
Web Developer Plugin by Chris Pedrick: https://chrispederick.com/
20+
21+
# PHP and SQL SETUP
22+
MAMP for MAC: https://www.wa4e.com/software-mac.php
23+
MAMP for Windows: https://www.wa4e.com/software-mamp.php
24+
XAMPP for Windows: https://www.wa4e.com/software-win.php
25+
26+
27+
# Intro to PHP
28+
PDF: https://d3c33hcgiwev3.cloudfront.net/IVMHLnAeEemE8A7At5Cb6A_8a4d99d9a8a74c048bc5a1ecafdaa2f8_05-Introduction-to-PHP.pdf?Expires=1589155200&Signature=C4yLe9hhF8VxyxJ3nVO6qQZSbwCBhA~5XK2kH76~wDjYfYRhrJOHA~q0~1I55tZOKamQXn~jVILGd6dlgiQHZ-yps3QF7rBTwNOHWqTF2zDJ0J78ZeRipvtZEy82kEhHApGeztLjntpYtziRWfgpDhb4WfEvDBPLB-AAZ0KBI4w_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
29+
30+
# PHP Arrays
31+
PDF: https://d3c33hcgiwev3.cloudfront.net/A1G4LOIASwSRuCziANsE2Q_03128a4c7cd845e2a4ead8580ecdcbb9_06-Arrays.pdf?Expires=1589155200&Signature=LozK2IVIeS69I7yR~nE6bjRVVdHJyhAFxChCAzw5b50oieq9VQGBtTt5KJ-YSSXOLhJ5RO6LX5Co5~q8xQidjg1ba8mLQ6Tr6vyhSNkLdyhu7pSYHcdwK2JFmEpNpJQJCt9EFNMWtvpoIuKyIM5QuCuLpS4O7X54baFfLE4QPCs_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
32+
33+
# PHP Functions
34+
PDF: https://d3c33hcgiwev3.cloudfront.net/_9bda45fb4a225811315baaf8910cb91a_07-Functions.pdf?Expires=1589155200&Signature=iHkPExgz~u9auGicMDUTdgNeVaNQKcTIZDd~YLL5peC7ystSIc6Ha99WQdIRNXMfIe1W8cT~SfcasSEZzk7xBy14B-MXTnuVebbW96oGab7K1BQ5vd64PwCebQD8J-YSOcKZmecZXTqBv6dwtx-6Yq0ndYhGIezcbZjXzLjEIVQ_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
35+
36+
PHP Functions: http://php.net/manual/en/function.sort.php
37+
38+
PHP Variable Scope: http://php.net/manual/en/language.variables.scope.php
39+
http://php.net/manual/en/language.variables.superglobals.php
40+
http://php.net/manual/en/function.array-key-exists.php
41+
42+
PHP Modularity: https://github.com/csev/wa4e
43+
44+
# PHP Forms
45+
46+
PDF: https://d3c33hcgiwev3.cloudfront.net/_d89f9de56f3c277045e89e50931d540d_08-Forms.pdf?Expires=1589155200&Signature=Rr4~iUc84amMZQWslLWzuEvML1b~dWX8l3tcOD3RO9mPryXRuMCcCann19dfcfSprHOX2ZGqm2PAH1T~ftztVGAdrgGT3SN4a9~Q4UUIa4SGQsHxJxePlW6iagI46HkUAimVNqhnrLnwODikF-aZv3FyPAVk4N3l8x-IjJbAY6Y_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
47+
48+
HTML Forms: http://www.wa4e.com/code/forms/form1.php
49+
Using GET and POST with Forms: http://www.wa4e.com/code/forms/form3.php
50+
HTML Input Types: http://www.wa4e.com/code/forms/more.php
51+
HTML5 Input Types: http://www.wa4e.com/code/forms/html5.php
52+
53+
Processing Form Data and HTML Injection: http://www.wa4e.com/code/forms/form4.php
54+
http://www.wa4e.com/code/forms/form5.php
55+
56+
Guessing Game: http://www.wa4e.com/code/forms/guess.php?guess=200
57+
58+
Model View Controller (MVC): http://www.wa4e.com/code/forms/guess_mvc.php
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Exploring the HyperText Transfer Protocol
2+
3+
You are to retrieve the following document in a browser tab with "Developer Mode" enabled so you can examine the HTTP Response headers. You may need to open the URL in a new tab, turn on developer mode, and then press refresh to get the proper data.
4+
5+
http://data.pr4e.org/intro-short.txt
6+
7+
Last Modified: Sat, 13 May 2017 11:22:22 GMT
8+
9+
ETag: "1d3-54f6609240717"
10+
11+
Content-Length: 467
12+
13+
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
14+
15+
Content-Type: text/plain
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
1.Question 1
2+
When a browser connects to a web server to retrieve a document, what is the default TCP/IP port that is used?
3+
--> 80
4+
5+
2.Question 2
6+
When a browser connects to a web server to retrieve a document, what command is sent to the server?
7+
--> GET
8+
9+
3.Question 3
10+
Which of the HTTP headers does the browser look at to decide how to display the retrieved document?
11+
--> Content-type
12+
13+
4.Question 4
14+
What does the second "T" of HTTP stand for?
15+
--> Transfer
16+
17+
5.Question 5
18+
Which of the following is NOT part of a Uniform Resource Locator?
19+
--> Operating System
20+
21+
22+
6.Question 6
23+
Which HTML tag typically generates a request to retrieve a document?
24+
--> a and img
25+
26+
7.Question 7
27+
What standards organization publishes many of the documents that describe the protocols we use on the Internet?
28+
--> IETF
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
HTML Practice Questions
2+
3+
Q1] What is true about the following HTML?
4+
<a href="http://www.dr-chuck.com/page2.htm">Second Page</a>
5+
6+
--> The reference is an absolute reference
7+
8+
Q2] What do you put at the beginning of an HTML file to inform the browser which variant of HTML you will be using in this document?
9+
10+
--> DOCTYPE
11+
12+
Q3] What is the name of the tag that is used in a document's <head> area to set the text shown in the tab of the browser or title bar?
13+
14+
--> title
15+
16+
Q4] In HTML, what attribute is used to indicate text that will be shown if an image is not loaded or read to a user that is using a screen reader?
17+
18+
--> alt
19+
20+
Q5] For the following HTML:
21+
<img src="csev_ian_dolphin_small.jpg" alt="Photo Credit: Ian Dolphin" width="160" align="middle">
22+
What is an example of an "attribute"?
23+
24+
--> src
25+
26+
Q6] How do you show a less-than (<) in an an HTML page?
27+
28+
--> &lt;
29+
30+
Q7] What does the <ul> tag accomplish?
31+
32+
--> Begins an un-ordered list.
33+
34+
Q8] In a table, what is the general order of tags from outer to inner when constructing a table?
35+
36+
--> <table> <tr> <td>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>
6+
... Samarth Srivastava bbe0c3 ...
7+
</title>
8+
</head>
9+
<body>
10+
<h1>Sam's First HTML Page</h1>
11+
<p>
12+
I would like to write something about Ed Sheeran, just because he's a great artist and I love his songs :3
13+
</p>
14+
15+
<p>
16+
<span>I have been listening to his songs since his biggest hit, <b>Thinking Out Loud</b> came out in the fall of 2014 (Now, only behind his song Shape of You) and since then I was in love with his songs. And besides being a great artists, he is also an exceptional guitar player.</span>
17+
</p>
18+
19+
<div>I just <b>fell in love</b> with his guitar skills and how he innovates new beats and sounds only with his guitar to give a background effect to the songs he performs at live concerts. </div>
20+
21+
<p>
22+
He was the <strong>main reason</strong> I started to develop my interest in <em>playing guitar</em>. Here's his picture if you don't still somehow know who I am talking about.<br>
23+
<img src="https://upload.wikimedia.org/wikipedia/commons/c/c1/Ed_Sheeran-6886_%28cropped%29.jpg" alt="Why is it not displaying" width="200" height="200">
24+
<br>
25+
<br>
26+
If you are also obsessed with him like I am, <a href = "https://en.wikipedia.org/wiki/Ed_Sheeran">click here</a> to know more about his achievements and himself.
27+
28+
<br>
29+
<br>
30+
31+
To checkout his website, <a href="www.edsheeran.com">click here</a>
32+
33+
<br>
34+
<br>
35+
36+
To listen to his songs, visit his <a href = "https://open.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V">Spotify.</a>
37+
</p>
38+
39+
<pre>
40+
But seriously, how in the world can you not know him.
41+
According to me, he is.....
42+
<b>The</b>
43+
<b>Best</b>
44+
<b>Singer</b>
45+
<b>Ever</b>
46+
</pre>
47+
48+
49+
<div>
50+
3 of his Chart Topping songs are:
51+
<ul>
52+
<li>Shape of you</li>
53+
<li>Thinking Out Loud</li>
54+
<li>Photograph</li>
55+
</ul>
56+
</div>
57+
</body>
58+
</html>
Loading
Loading
Binary file not shown.
12.9 MB
Binary file not shown.
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
/* This is a partial blocks.css, you need to add more rules
3+
to this file to complete the assignment. Do not add any CSS
4+
styling to the original index.htm / start.htm */
5+
6+
body {
7+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
8+
}
9+
10+
div{
11+
width: 25%;
12+
}
13+
14+
/* Here is one of many CSS rules you will need... */
15+
#one {
16+
border-style: solid;
17+
border-width: 5px;
18+
border-color: orange;
19+
padding: 5px;
20+
position: fixed;
21+
top: 0px;
22+
left: 0px;
23+
margin: 5px;
24+
}
25+
26+
#two{
27+
border-style: solid;
28+
border-width: 5px;
29+
border-color: green;
30+
padding: 5px;
31+
position: fixed;
32+
top: 0px;
33+
right: 0px;
34+
margin: 5px;
35+
}
36+
37+
#three{
38+
border-style: solid;
39+
border-width: 5px;
40+
border-color: yellow;
41+
padding: 5px;
42+
bottom: 0;
43+
left: 0;
44+
position: fixed;
45+
margin: 5px;
46+
}
47+
48+
#four{
49+
border-style: solid;
50+
border-width: 5px;
51+
border-color: blue;
52+
padding: 5px;
53+
bottom: 0;
54+
right: 0;
55+
position: fixed;
56+
margin: 5px;
57+
}
58+
59+
a{
60+
background-color: blue;
61+
color: white;
62+
position: absolute;
63+
top: 0;
64+
}
65+
66+
p{
67+
text-align: center;
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Blocks</title>
5+
<!-- Do not change this file - add your CSS styling
6+
rules to the blocks.css file included below -->
7+
<link type="text/css" rel="stylesheet" href="blocks.css">
8+
</head>
9+
<body>
10+
<div id="one">
11+
Turns out you have a really fun time if you
12+
go to work every day and focus on being
13+
silly and funny and happy! - Hannah Murray
14+
</div>
15+
<div id="two">
16+
All you need in this life is ignorance and confidence,
17+
and then success is sure. - Mark Twain
18+
</div>
19+
<div id="three">
20+
Well, if crime fighters fight crime and fire fighters
21+
fight fire, what do freedom fighters fight? They never
22+
mention that part to us, do they? - George Carlin
23+
</div>
24+
<div id="four">
25+
Great minds discuss ideas; average minds discuss events;
26+
small minds discuss people. - Eleanor Roosevelt
27+
</div>
28+
<p id="link">
29+
<a href="https://www.brainyquote.com/" target="_blank">
30+
Brainy Quote
31+
</a>
32+
</p>
33+
</body>
34+
</html>
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
echo "<pre>\n";
4+
echo 'display_errors = ' . ini_get('display_errors') . "\n";
5+
6+
if ( ini_get('display_errors') == 1 ) {
7+
echo("It is all good...\n");
8+
echo "</pre>\n";
9+
return;
10+
}
11+
12+
echo("YOU ARE IN VERY BAD SHAPE!!!!!!\n");
13+
echo("You need to edit this file:\n\n");
14+
echo(php_ini_loaded_file()."\n\n");
15+
echo("And set\n\n");
16+
echo("display_errors = On\n\n");
17+
echo("Until you do this, you will be very very unhappy doing PHP development\n");
18+
echo("in this PHP environment.\n");
19+
20+
echo "</pre>\n";
21+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
echo("<p>What we want to see below is a 'Fatal Error'.</p>\n");
3+
4+
// Do not fix the mistake in the code below - the goal is to
5+
// trigger an error to verify that we see errors in the browser.
6+
7+
failure_is_expected();
8+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title> Samarth Srivastava PHP </title>
5+
</head>
6+
<body>
7+
<h1> Samarth Srivastava PHP </h1>
8+
<p>
9+
<?php
10+
echo "The SHA256 Hash of 'Samarth Srivastava' will be: ";
11+
print hash('sha256', 'Samarth Srivastava');
12+
?>
13+
</p>
14+
15+
<pre>
16+
The ASCII ART:
17+
18+
****************
19+
****************
20+
** **
21+
** **
22+
**
23+
**
24+
****************
25+
****************
26+
**
27+
**
28+
** **
29+
** **
30+
****************
31+
****************
32+
</pre>
33+
<a href= "check.php"> Click here to check the error setting </a>
34+
<br/>
35+
<a href = "fail.php"> Click here to cause a traceback </a>
36+
</body>
37+
</html>
38+
48.1 KB
Loading
41.7 KB
Loading
24.5 KB
Loading

0 commit comments

Comments
 (0)