... saving all your plug- ins into one or more separate program
files that can be included into your code with simple directives. This means you’ll only ever
have a single instance of each plug- in ... will then be reflected in all pr
ojects
that include it.
PHP supplies two main methods for including files: include and require.
Using include
As you would expect, the include command ta...
... would not be the
same. In fact, the whole team at McGraw-Hill is a pleasure to work with and I thank
you all for your, kindness, intelligent insights, and support.
xxiii
Plug- in 97: Google Translate ... . . . . . . . . . . . 331
The Plug- in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Plug- in 100: Display Bing Map . . . ....
... browser. If everything is correct, you should get a terse message similar to the one
in Figure 1-20. You can now enter the Admin interface by entering http://localhost :1008 1
into your browser.
FIGURE ...
15
After Installation
The last thing you need to do in order to verify whether Zend Server CE has actually
installed correctly is to test out the web server by entering the URL http:...
... sites remains the information contained within
its text. This first batch of plug- ins concentrates on providing a range of functions to
facilitate manipulating and presenting text in the most ... job. Some of these plug- ins are so useful they are themselves
used by other plug- ins in this book.
Wrap Text
You can make text wrap in a browser in various ways, including using tabl...
... s
About the Plug- in
This plug- in takes a string variable containing the text to process and an array containing
words to be highlighted, as well as a parameter defining the type of highlighting. These ... shown in Figure 3-6, you could use the following:
for ($j = 0 ; $j < 101 ; ++$j) echo PIPHP_CountTail($j) . ", ";
The Plug- in
function PIPHP_CountTail($number)
{...
... that because this plug- in makes use of plug- in 35, PIPHP_ValidateText(), you
must also have a copy of it in the same program file, or otherwise include it.
The Plug- in
function PIPHP_ValidateEmail($email) ...
129
Variables, Arrays, and Functions
$at Integer pointing to the position of the @ sign
$left
String containing the left half of the e-mail address
$right
String containi...
... $datafile
$text String containing all but the first message in $datafile
$lines Array containing posts extracted from $text
$temp
String containing the post number of the final post in the file
How ... of a single message.
How to Use It
To use this plug- in you only need to pass it the name of a datafile containing Guestbook
data and an argument telling it which order to use when retu...
... It’s a plug- in to fetch up to the last 20
posts of any Twitter user who’s profile isn’t private. Figure 8-8 shows the result of pointing
the plug- in at Eminem’s Twitter feed.
About the Plug- in
This ... s a g i n g
199
Variables, Arrays, and Functions
$url
String containing the URL of Twitter’s user timeline API
$file String containing the data returned by $url
$xml XML object c...
... shows data that has been saved in a session using the PHP program file plugin65.
php, being fully recalled by calling up plugin66 .php.
FIGURE 9-6 With this plug- in, a single function call will retrieve ... r S o l u t i o n s
About the Plug- in
This plug- in takes all the same details about a user we have previously been storing in a
MySQL database and saves them in PHP...