Computer Science E-75 Building Dynamic Websites Harvard Extension School http://www.cs75.net/

Lecture 2: PHP, Continued David J. Malan [email protected] 0

Forms

1

Regular Expressions http://us3.php.net/pcre

Table adapted from http://www.webcheatsheet.com/php/regular_expressions.php.

2

A Dynamic Website

3

OOP http://us2.php.net/zend-engine-2.php

4

Cookies

Image from sgc.se.

5

Sessions

6

Authentication

7

.htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.cs75\.net [NC] RewriteRule (.*) http://www.cs75.net/$1 [R=301,L] RewriteCond %{REQUEST_URI} ^/login/ RewriteCond %{HTTPS} != on RewriteRule (.*) https://www.cs75.net/$1 [R=301,L]

8

SSL

Image from godaddy.com.

9

SSL SSLCertificateFile /path/to/certficate SSLCertificateKeyFile /path/to/key SSLCertificateChainFile /path/to/chain

https://certs.godaddy.com/CSRgeneration.go

10

PizzaML

Image from junkfoodnews.net.

11

Computer Science E-75 Building Dynamic Websites Harvard Extension School http://www.cs75.net/

Lecture 2: PHP, Continued David J. Malan [email protected] 12

Computer Science E-75 - Building Dynamic Websites

Table adapted from http://www.webcheatsheet.com/php/regular_expressions.php. Page 4. 3. A Dynamic Website. Page 5. 4. OOP.

171KB Sizes 3 Downloads 234 Views

Recommend Documents

Computer Science E-75 - Building Dynamic Websites
Table adapted from http://www.webcheatsheet.com/php/regular_expressions.php. Page 4. 3. A Dynamic Website. Page 5. 4. OOP.

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 5: SQL. David J. Malan [email protected] ...

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 10: Ajax, Continued. David J. Malan.

Computer Science E-75 - Building Dynamic Websites
21. Debuggers. ▫ FireBug https://addons.mozilla.org/en-US/firefox/addon/1843. ▫ JavaScript Debugger https://addons.mozilla.org/en-US/firefox/addon/216 ...

Computer Science E-75 - Building Dynamic Websites
Page 2. 1. Grades. Page 3 ... Page 4. 3. Relational Databases. Page 5 ... 10. Lunch http://www.rebeccascafe.com/wraps_sandwiches_boston_catering.html.

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 10: Ajax, Continued. David J. Malan.

Computer Science E-75 - Building Dynamic Websites
Page 2 ... 11. Caching. ▫ .html. ▫ MySQL Query Cache. ▫ memcached. ▫ . ... query_cache_type = 1 http://dev.mysql.com/doc/refman/5.0/en/query-cache.html ...

Computer Science E-75 - Building Dynamic Websites
START TRANSACTION;. UPDATE account SET balance = balance - 1000 WHERE number = 2;. UPDATE account SET balance = balance + 1000 WHERE number = 1;. SELECT balance FROM account WHERE number = 2;. # suppose account #2 has a negative balance! ROLLBACK;. E

Computer Science E-75 - Building Dynamic Websites
6. Properties. ▫ onreadystatechange. ▫. readyState. □ 0 (unitialized). □ 1 (open). □ 2 (sent). □ 3 (receiving). □ 4 (loaded). ▫. responseBody. ▫. responseText. ▫. responseXML. ▫ status. □ 200 (OK). □ 404 (Not Found). □ 500

Computer Science E-75 - Building Dynamic Websites
12. CSV. Image from finance.yahoo.com. Page 14. 13. Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/.

Computer Science E-75 - Building Dynamic Websites
0. Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 6: SQL, Continued. David J. Malan [email protected] ...

Specification - Building Dynamic Websites
Sep 28, 2009 - HTML, XHTML, and CSS: Your visual blueprint for designing effective Web .... At least one of your pages must include at least one mailto: link.

Syllabus - Building Dynamic Websites
Dec 21, 2009 - JavaScript and PHP, how to configure Apache and MySQL, how to ... Prior programming experience (in any language) and familiarity with ...

JavaScript - Building Dynamic Websites
put cursor in username field if empty if (document.forms.login.username.value == ""). { document.forms.login.username.focus(); document.forms.login.username.value = document.forms.login.username.value;. } // else put cursor in password field else. {

Specification - Building Dynamic Websites
Sep 28, 2009 - All work that you do toward fulfillment of this course's expectations must be your own unless collaboration is explicitly allowed (e.g., by some ...

Notes - Building Dynamic Websites
case "PHP": header("Location: http://us.php.net/results.php?q=" . $_GET["q"]); break; case "MySQL": header("Location: http://search.mysql.com/search?q=" . ... purpose is to whisk the user away, in which case there shouldn't be any time left to ... de

Notes - Building Dynamic Websites
MySQL PHP) framework as well as employing Ajax. Ajax is the fantastic .... language which will empower you to create dynamic websites. Soon after, we'll hit ...

Notes - Building Dynamic Websites
these projects and on average you will require about 10 hours over the course of those three .... 1America is the best. Just ask this guy. 5 .... One of the advantages of doing our own web hosting is that we have root access over the server.

Notes - Building Dynamic Websites
in the semester when we work with databases that forgetting to escape user input can be a serious security concern. • We resorted .... Register for Frosh IMs. .

Syllabus - Building Dynamic Websites
Dec 21, 2009 - Today's websites are increasingly dynamic. Pages are no longer static HTML files but instead generated by scripts and database calls.

JavaScript - Building Dynamic Websites
if (document.forms.login.username.value == "") ... document.forms.login.password.focus(); ... 19. Quirks http://www.quirksmode.org/js/contents.html ...

Project 1 - Building Dynamic Websites
Oct 19, 2009 - All work that you do toward fulfillment of this course's expectations must be your own unless collaboration is explicitly allowed (e.g., by some ...

Project 1 - Building Dynamic Websites
Oct 19, 2009 - or other students' solutions to Project 1, Project 2, or Project 3 to .... After all, you don't want a phone call every ... That way, too, the folks at.

Project 1: PizzaML - Building Dynamic Websites
Oct 19, 2009 - shared in the course's virtual classroom) or lifting material from a book, magazine, ... Design. To what extent is your code written well (i.e., clearly, ... The bulletin board is actually PHP-based software called SMF that we download