Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites
CREATE TABLE Message ( ID INT NOT NULL AUTO_INCREMENT, Title VARCHAR(64), Poster VARCHAR(64), Created DATETIME, Parent INT, Body ...
...
...
For the efficiency-minded, this use of recursion is not optimal. Each thread will cause another call to showMessages, which caus ...
proposed a solution in his white paper "The Design of a Robust Persistence Layer for Relational Databases" <http://www.ambyso ...
Chapter 18. NETWORK HTTP Authentication........................................................................................ ...
Listing 18.1 Requiring Authentication <? / Define a couple of functions for starting and ending an HTML document / function ...
} ?> Now that you know how to protect a page, it may be instructive to workthe other direction, requesting a protected page. ...
wasteful retransmission of pages. However, if the content on your page potentially changes with each request, it can be annoying ...
that the file is being returned by the cache, try reloading the page quickly. The dates on the page should remain the same. Noti ...
official media types at <http://www.isi. edu/in- notes/iana/assignments/media-types/ >. At times, you may wish to take adv ...
There are several example implementations to be found on the Web. Check out David Sklar's networking section http://px.sklar.com ...
Listing 18.6 Sending Attachments <? /* Function: makeAttachment Input: ARRAY attachment Output: STRING Description: Retur ...
*/ function mailAttachment($to, $from, $subject, $attachment) { //add from header $headers = "From: $from\r\n"; //specify MIME v ...
$attach[] = array("name"=>basename(FILE), "content"=>fread($fp, filesize(FILE)), "type"=>"application/octet-stream"); f ...
happens, the mail bounces back to the user who sent the mail. Unfortunately, this is probably the Web server itself. Reading thr ...
//make sure the domain has a mail exchanger if(checkdnsrr($domain, "MX")) { //get mail exchanger records if(!getmxrr($domain, $m ...
$stopTime = time() + 10; $gotResponse = FALSE; while(TRUE) { //try to get a line from mail server $line = fgets($fp, 1024); if(s ...
fputs($fp, "QUIT\r\n"); fclose($fp); if(substr($line, 0, 3) != "250") { //mail server doesn't recognize //this address, so it mu ...
very unresponsive, a further check must be made against a clock. If ten seconds pass, the server will be considered unavailable. ...
«
25
26
27
28
29
30
31
32
33
34
»
Free download pdf