Download Core web application development with PHP and MySQL 1. printing Edition Wandschneider ebook All Chapters PDF
Download Core web application development with PHP and MySQL 1. printing Edition Wandschneider ebook All Chapters PDF
https://ebookfinal.com
https://ebookfinal.com/download/core-web-
application-development-with-php-and-
mysql-1-printing-edition-wandschneider/
https://ebookfinal.com/download/php-and-mysql-web-development-fourth-
edition-thomson/
ebookfinal.com
https://ebookfinal.com/download/php-and-mysql-web-development-second-
edition-welling-l/
ebookfinal.com
https://ebookfinal.com/download/web-application-development-with-yii-
and-php-2nd-revised-ed-edition-jeffrey-winesett/
ebookfinal.com
Build Your Own Database Driven Web Site Using PHP MySQL
4th Edition Kevin Yank
https://ebookfinal.com/download/build-your-own-database-driven-web-
site-using-php-mysql-4th-edition-kevin-yank/
ebookfinal.com
Learning PHP MySQL JavaScript and CSS 2nd Edition Robin
Nixon
https://ebookfinal.com/download/learning-php-mysql-javascript-and-
css-2nd-edition-robin-nixon/
ebookfinal.com
https://ebookfinal.com/download/learning-php-mysql-step-by-step-guide-
to-creating-database-driven-web-sites-second-edition-michele-e-davis/
ebookfinal.com
https://ebookfinal.com/download/learning-php-mysql-javascript-with-
jquery-css-html5-early-release-5th-5th-edition-robin-nixon/
ebookfinal.com
https://ebookfinal.com/download/php-mysql-the-missing-manual-second-
edition-brett-mclaughlin/
ebookfinal.com
MARC WANDSCHNEIDER
ISBN 0-13-186716-4
Text printed in the United States on recycled paper at R.R. Donnelly in Crawfordsville, IN.
First printing, September 2006
Contents
Introduction xxiii
Target Audience xxiii
About PHP xxiv
Layout xxiv
Before You Begin xxv
Acknowledgments xxv
In Closing xxvi
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
V
Contents
vi
Unicode 135
Unicode Encodings 136
Making Sense of It All in PHP 136
Working with Other Character Sets 136
Trouble Rears Its Ugly Head 138
How We Will Work with Characters 139
Configuring PHP for Unicode 140
Installation and Configuration of mbstring and mbregex 140
Function Overloading 141
Operating on Strings 141
Getting Information 141
Cleaning Up Strings 143
Searching and Comparing 144
Extraction 148
Case Manipulation 149
Character Encoding Conversions 150
Summary 150
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
PART VI Appendixes
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Index 825
This page intentionally left blank
Introduction
T his is the book I wish I had a couple years ago when I sat down and decided to
learn something about web applications. The transition from programming standard
window-system GUI applications to writing dynamic web applications was surprisingly
complicated. Extremely productive languages, such as Personal Home Page (PHP), make
the transition easier, but the learning curve remains steep.
With that in mind, I sat down to write this book and explain how to use the various tech-
nologies that go into writing web applications. I have made every mistake possible while
learning about PHP and databases, and have therefore tried to incorporate as much of
what I learned into this book. Far too many books published these days are merely a
reprint of existing documentation or Unix man pages, and I truly wanted to see something
different in print.
The technologies, however, are only half the battle. Without strategies or systematic
approaches to design and implementation, applications are doomed to an expensive
and messy existence at best—or failure at worst. Therefore, this book focuses on a lot of
things you might not see covered to the same extent in other books—design, testing, and
security.
Target Audience
This book is targeted at people who need or want to write a web application. You might
be a corporate developer looking to build an intranet application for your company or an
xxiii
Core Web Application Development with PHP and MySQL
xxiv
Internet web application for customers. You might be a consultant helping a small busi-
ness develop a web store, or just a hobbyist looking to learn more about web applications
and write one of your own.
The assumption is that you have at least a passing familiarity with programming,
although this book by no means expects you to be an expert. An understanding of basic
programming constructs, such as variables and functions, and a basic understanding of
HTML should be more than sufficient.
Because I knew next to nothing about databases when I started learning about web appli-
cation programming, I likewise expect no more of the reader. This book covers databases
from basic terminology and design to basic and advanced queries, with an appropriate
balance between clear-and-simple instruction and interesting examples to help you in
your development.
About PHP
PHP began in 1994 as a series of scripts called PHP/FI (Personal Home Page/Forms
Interpreter), and it was written by a fellow named Rasmus Lerdorf to help him manage
documents on his web site. Over the years, PHP grew into something more serious. In
1997, a second version of the system came out with additional functionality.
In late 1998, PHP 3.0 was released, leading to a major rewrite of the code and the involve-
ment of two new developers—Zeev Suraski and Andi Gutmans. The goal was to support
progressively broader and more complex applications on the web. In early 2000, version
4.0 was released. Based on a new language engine called the Zend Engine, this version
had much better performance and increased code modularity. By late 2004, the much-
evolved version 5.0 was released. It included many new features, such as new language
constructs, broader web server support, sessions, and additional third-party extensions.
Among the new language features was a significantly improved and expanded object-
oriented programming model, which this book uses extensively. Somewhere along the
way, PHP ceased to refer to “Personal Home Page” and came to mean “PHP Hypertext
Preprocessor,” a so-called recursive acronym. (The acronym actually forms part of the
term it defines!)
PHP is a remarkably productive language—you can sit down and crank out (yes, that’s
the technical term) large amounts of code in a short period of time, and this productivity
is what drew me to it some years back. With PHP, I was able to put together surprisingly
robust and dynamic travelogues of my journeys to various countries with relatively little
code.
The one possible “fly in the ointment” is that the language can be quirky compared to
other programming languages—especially if you, like me, come from a background of
languages more similar to C/C++, Java, or Visual BASIC. In fact, many of the things cov-
ered in this book are the result of my sitting around and scratching my head for a couple
of hours. However, after you become comfortable with it, the language proves fun to
write and is surprisingly powerful.
Layout
This book is divided into six parts, which represents the logical progression of writing
web applications.
Part I, “The Basics of PHP,” covers the PHP language itself, starting with descriptions
and discussions of the most basic types of language. Part I then moves on to functions,
Introduction • Acknowledgments
xv
Acknowledgments
I would like to thank the Academy for all the wonderful…gosh…I mean…what a rush!
Oh wait, wrong speech.
In all seriousness, no book can be written without a lot of help, and this is no exception.
Prentice Hall and my editor Mark Taub both deserve a huge amount of thanks for help-
ing me realize a dream and working with me on this book. The freedom and opportunity
to write the book I wanted to write were never threatened, and they have been amazing
at answering questions as I sent them.
Core Web Application Development with PHP and MySQL
xxvi
The technical review team of Kristine Kuch, Matthew Leingang, and Kimberly Jenson are
owed a huge debt of thanks. Never afraid to call me on stupid mistakes or bad writing or
short with praise and compliments, these people have taught me tons and have helped
me grow as both a web applications programmer and author over the past six months.
Finally, none of this would be possible without the support of my wife Samantha, who
encouraged me repeatedly to do more writing in the first place and lovingly nudged me
on those evenings when I swore I would never look at another computer again and was
sick of typing.
In Closing
I hope that you enjoy reading this book. I certainly hope that it helps you in your web
application programming endeavours and also provides at least some reading enjoyment.
I am a terribly chatty person, and always love to hear from people; therefore, if you have
any comments on the book or suggestions of things to add or treat differently, I’d be
delighted to hear from you at [email protected].
PART I
The Basics
of PHP
This page intentionally left blank
1
Getting Started
with PHP
B y now, you have managed to get PHP running on your server or workstation and
are ready to start writing scripts in PHP. If you have not, or you are still having problems,
please see Appendix A, “Installation/Configuration,” for more details. In this chapter, we
are going to write our first programs using Personal Home Page (PHP), and learn about the
basics of working with the language.
Over the course of this chapter we will
• Write a few basic PHP programs and learn how to enter and process PHP scripts
• See the basics of how the language is structured and how to comment your code
• Learn about some of the more common and basic data types in PHP
• Learn about some useful functions that we will use throughout this book
3
Core Web Application Development with PHP and MySQL
4
When the web server receives a request for an appropriately named file, it passes this to
the PHP engine, which then processes the file one line at a time. For lines that do not
contain PHP code (typically, lines containing HTML markup), the server emits them
untouched and executes any PHP script code as it is seen. With this in mind, we write
our first program, which is a mixture of PHP and HTML.
<html>
<head>
<title>My First PHP Program</title>
</head>
<body>
<?php
echo "Hello Everybody!";
?>
</body>
</html>
If we type this into a file called firstprogram.php and put it in our document root directory,
we can then type the URL for the path to this file (for example, http://localhost/
gettingstarted/firstprogram.php). We should then see something similar to Figure 1-1.
If you have problems getting the script to run correctly, here are a few things you should
investigate:
• Make sure you entered the URL to the script file correctly, making sure that the server
name is valid.
Do not forget that the path gettingstarted is relative to the document root directory
for the web site. So, if our web site’s root directory were c:\inetpub\wwwroot or
/home/samplesite/www, then our directory in the preceding example would be
c:\inetpub\wwwroot\gettingstarted or /home/httpd/www/gettingstarted.
1 • Your First PHP Programs
5
• If you see just the code of your script printed onscreen, chances are that your web
server has not been configured to recognize .php files as needing to be sent to the PHP
interpreter.
• If you get an error saying that the host could not be found, then you should make sure
that the web server is actually running. See Appendix A for more information.
Most of the file is simply HTML text. As we have said, the PHP language engine outputs
any text it sees and looks for PHP code sections. In the preceding file, the PHP code is
demarcated by the tags
<?php
...
?>
When the PHP language engine sees these two tags, it processes the script and takes any
appropriate actions. When the script portion ends, it resumes output of HTML.
To learn more about our PHP installation, we will write a small script in our next program
that uses a helpful little tool. This function, called phpinfo, is used as follows:
<?php
phpinfo();
?>
This script produces output similar to that seen in Figure 1-2. (We did not have to use
HTML headers or markup since the phpinfo function emits these for us.)
Figure 1-2: Learning about our PHP interpreter with the phpinfo() function.
Core Web Application Development with PHP and MySQL
6
This method is safe for both XHTML and XML files; therefore, it is the method we will use
throughout this book.
Another way to demarcate PHP script is as follows:
<?
echo "Bonjour tout le monde!";
?>
This is called using short tags. Short tags are available only if the short_open_tag setting
is enabled in your php.ini configuration file (see Appendix A). The use of this style is gen-
erally discouraged, as it does not save you much in typing and can create problems as you
move your code from server to server, where one of them might not have short tags
enabled.
A third way of entering script is
<script language="php">
echo "Ciao a tutti!";
</script>
This method does not buy us very much and is generally used much less than the first
style.
One final style of inputting script exists to support some older graphical HTML editing
programs that are unable to understand script directives very well and would move script
around when they generated HTML for user input. However, some of these editors could
support tags by marking code as ASP script. To let users continue to use these editors, you
can mark PHP script using these ASP tags:
<%
echo "Guten Tag alle!";
%>
ASP tags can only be used if the asp_tags setting is enabled in the php.ini configuration
file.
Even though we will use the first style of tags, we have shown you all the possible types
to prepare you for other codes you may encounter.
you might want to personalize a greeting message ($userName is a variable, which we will
introduce more formally soon):
<?php
$userName = "Chippy the Chipmunk";
?>
<p align='left'>
Hello there, <b><?php echo $userName; ?></b>
</p>
A shortcut exists for this particular usage. It involves the short tags discussed in the previ-
ous section along with an equals sign (=):
<?= $userName ?>
This is the same as typing
<?php echo expression; ?>
This can be a handy way to save a bit of typing when you are injecting several expressions
into your HTML. However, we will continue to avoid using short tags and stick with the
normal syntax.
The flexibility available when mixing PHP and HTML allows us to be creative when we
get into more advanced language constructs. (These concepts will be introduced in
Chapter 2, “The PHP Language.”)
<?php
?>
This, like some other things we will encounter as we learn about web application pro-
gramming with PHP—while perfectly valid in PHP—is probably something we should
Core Web Application Development with PHP and MySQL
8
use sparingly. We should write code that is legible and easily maintainable whenever
possible.
{
echo "This is a group of statements";
$m = "oink";
}
$userName
=
"Chippy the Chipmunk"
;
?>
Just because one can do this, however, does not mean it is recommended. Programmers
are always encouraged to make their code legible.
The end of a section of PHP script is also a valid way to terminate a statement:
<?php echo "Semi-colon not necessary here!" ?>
//
// This is our second style of comment. It is "single line"
//
echo "Style 2";
#
# This third style is also "single line."
1 • How to Store Data
9
#
echo "Style 3";
?>
The first two styles are very common in higher-level programming languages, such as
C/C++, Java, and C#, while the latter style will be familiar to programmers of Perl and
shell scripts.
The first style of comments beginning with “/*” causes the PHP processor to ignore all
text until it sees a closing “*/” sequence. This can cause problems if you try to nest
comments.
<?php
/*
/**
* this is a comment.
*/
echo "This is some code";
*/
?>
Because of the nested comment, the processor stops treating the code as comment text at
the first “*/” token and reports and error at the second, because it no longer believes itself
to be processing comments.
The two types of single-line comments cause the PHP language processor to ignore all
code until the end of the current line or current PHP script section.
<?php
// all of this line is ignored.
echo "But this line prints just fine.";
?>
In versions of PHP prior to version 4, variables would be declared at their first use instead
of their first assignment, which often proved tricky when debugging code.
<?php
?>
Fortunately, PHP 5 prints a warning saying that, for instance, "$ceiling” has not been
assigned a value.
Numbers
There are two basic types of numbers in the language: integer (int ) and float (float).
While many languages distinguish between single and double-precision floating-point
numbers, PHP does not—they are all 64-bit floating-point numbers with approximately 14
digits of precision. PHP does, however, support the keyword double in addition to float
for compatibility.
Integers are specified in code in octal (base-8), decimal (base-10), or hexadecimal (base-16)
notations.
<?php
?>
1 • Entering Basic Types in PHP
11
Integer precision varies largely by the underlying operating system, but 32 bits is com-
mon. There are no unsigned integers in PHP, so the maximum value for an integer is
typically larger than 2 billion. However, unlike other languages that overflow large
positive integers into large negative integers, PHP actually overflows integers to floating-
point numbers.
<?php
$large = 2147483647;
var_dump($large);
$large = $large + 1;
var_dump($large)
?>
In the previous snippet of code, we introduce the var_dump function, a powerful debug-
ging tool used to see both the type and value of a variable in PHP. We will return to this
later in the chapter in the section titled “Some Very Useful Functions.”
Even though we will discuss arithmetic operators such as addition, multiplication, and
subtraction in Chapter 2, in the section titled “Expressions and Operators,” we will take
time now to note that there is no integer division in PHP. Unlike some other languages,
for which the expression
5 / 2
would yield an integer result with the value 2, PHP would return the value 2.5, typed as
float. If you want the integer value result of a division operation, you need to cast the
value to an integer (see the section “Type Conversions” in Chapter 2) or use the round
function, which you can learn about via the PHP Online Manual.
Floating-point variables can be input in a few different ways:
<?php
$floatvar1 = 7.555;
$floatvar2 = 6.43e2; // same as 643.0
$floatvar3 = 1.3e+4; // same as 13000.0;
$floatvar4 = 5.555e-4; // same as 0.0005555;
$floatvar5 = 1000000000000; // too big for int ==> float
?>
One caution with floating-point numbers: Remember that they are only approximate val-
ues. Because of their limited precision, they are very close to the intended value but are
not always the value you would like.
Core Web Application Development with PHP and MySQL
12
For example, the value 2.5 will often be represented internally as 2.4999999999, or some-
thing similar. Thus, the following code will often prove problematic:
<?php
?>
Code snippets such as these often print "What???", depending on the exact implementa-
tion of floating-point numbers.
The recommendation is to avoid comparing specific floating-point values. Instead, you
should round them to the nearest integer value using round, or compare them against the
ranges of values.
Strings
A string is a sequence of characters. In PHP, these characters are 8-bit values. This is con-
venient for many Western languages but proves a bit problematic when trying to work
with systems using more complicated alphabets, such as Chinese. We will cover solutions
for this in more detail in Chapter 6, “Strings and Characters of the World.”
There are three ways to specify a string value.
Single Quoted
Single-quoted strings are sequences of characters that begin and end with a single quote (').
<?php echo 'This is a single-quoted string.'; ?>
To include a single quote within a string, you simply put a backslash in front of it. This is
called escaping the character.
<?php echo 'This is a single-quoted (\') string.'; ?>
If you actually want to print \' as output or if you want to end a string with a backslash
character, then you need to escape the backslash one more time.
<?php
?>
1 • Entering Basic Types in PHP
13
Escape Output
\n Linefeed character (0x0a/10 in ASCII)
\r Carriage return character (0x0d/13 in ASCII)
\t Tab character
\\ Backslash
\$ Dollar sign character
\0octal-number A character identified by its value in the range 0–255,
specified in octal notation.
\xhexadecimal-number A character identified by its value on the range 0–255,
specified in hexadecimal notation.
No other escape sequences are supported, and (in the case of single-quoted strings) non-
matching sequences will simply print the backslash and the other character.
<?php
echo "This is a rich \"\$\$\" double-quoted string.";
echo "<br/>\n";
echo "This is a rich \042\x24\x24\042 double-quoted string.";
echo "<br/>\n";
echo "This won't quite do what \n\n you expect it to!";
echo "<br/>\n";
echo "Neither likely
will
this.";
echo "<br/>\n";
echo "\\ + A isn't a valid escape, so this will print \A";
?>
Random documents with unrelated
content Scribd suggests to you:
the last session of the legislature, the Department has placed groups
of convicts from the various State prisons at work improving roads in
different parts of the State. The plan will be extended as fast as
possible with the available appropriation and it is hoped that some
500 miles of earth road will be improved during the summer.
At present there are five convict squads on the roads. Three squads
have been sent out from Dannemora. They are all engaged in
Clinton County one squad improving a bad stretch of the old military
turnpike. Two more squads are out from Great Meadow, one working
on the Comstock-Whitehall road and the other on the Ticonderoga-
Schroon lake road in Warren county.
So far the plan has proved most successful. The convicts are keen
for the chance of work in the open air and the result to the counties
in which the work is being carried on is gratifying in improved traffic
conditions.
Several squads have been made up to be sent out from Auburn
prison, but an outbreak of scarlet fever in the institution has delayed
the plan. As soon as the quarantine is lifted many prisoners will be
put to work.
By the provisions of the new law the thirty-mile radius from the walls
of prisons within which convicts could be engaged in road work has
been removed, so that they may be employed in any part of the
State. In addition to this, for the first time an appropriation has been
made of $50,000 for carrying on the work of improving roads by
convict labor. Boards of Supervisors of the various counties are
applying to the Prison Department for convicts to improve roads in
the counties which are not included in the State macadamized
system.
Under the plan of Superintendent Riley the $50,000 will be spent in
improving earth roads rather than trying to build roads of macadam
because of the much greater use of the appropriation. Ten miles of
good earth road may be built for the amount required to construct a
single mile of macadam where gravel or other proper material for
surfacing is obtainable. It also costs less to maintain ten miles of
gravel road than one mile of macadam, declares Superintendent
Riley.
“After the $100,000,000 to which the State is pledged is expended
on the State highways there will be a very large percentage of the
roads in the State which will not be touched by this expenditure,”
said Superintendent Riley. It is for the good of these roads, many of
them of the greatest importance, that he wishes to direct the convict
road labor particularly. Hudson Republican, June 8.
NOTES
A new county workhouse costing $25,000 has been built at South
Range, Wis., on a tract of 160 acres, which will be worked by the
prisoners.
Sir A. Conan Doyle recently visited Sing Sing, and agreed with
everybody but the legislators of the State of New York that Sing Sing
ought to go.
A commission has been authorized by the State of Pennsylvania and
appointed by the Governor, to consider revision of the penal laws.
Two of the members of the commission are Edwin M. Abbott of
Philadelphia and Warden McKenty of the Eastern Penitentiary.
At Sing Sing the new warden has started out well. He has given to
the inmates Saturday afternoon for recreation, and has introduced
base ball and other sports. If it works successfully the inmates will
have a recreation hour daily, at the close of the day’s work.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com