[FREE PDF sample] CodeIgniter for Rapid PHP Application Development Improve your PHP coding productivity with the free compact open source MVC CodeIgniter framework 1st Edition David Upton ebooks
[FREE PDF sample] CodeIgniter for Rapid PHP Application Development Improve your PHP coding productivity with the free compact open source MVC CodeIgniter framework 1st Edition David Upton ebooks
com
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/multi-tier-application-programming-with-
php-1st-edition-david-wall/
ebookname.com
https://ebookname.com/product/building-php-applications-with-symfony-
cakephp-and-zend-framework-1st-edition-bartosz-porebski/
ebookname.com
https://ebookname.com/product/wood-fracture-characterization-first-
edition-marcelo-f-s-f-de-moura/
ebookname.com
Electrons in Solids Mesoscopics Photonics Quantum
Computing Correlations Topology Graduate Texts in
Condensed Matter 1st Edition Hendrik Bluhm
https://ebookname.com/product/electrons-in-solids-mesoscopics-
photonics-quantum-computing-correlations-topology-graduate-texts-in-
condensed-matter-1st-edition-hendrik-bluhm/
ebookname.com
https://ebookname.com/product/unimaginable-bodies-intellectual-
disability-performance-and-becomings-1st-edition-anna-catherine-
hickey-moody/
ebookname.com
https://ebookname.com/product/traumatic-brain-injury-part-ii-1st-
edition-jordan-grafman-and-andres-m-salazar-eds/
ebookname.com
https://ebookname.com/product/writing-and-reading-across-the-
curriculum-eleventh-edition-laurence-behrens/
ebookname.com
https://ebookname.com/product/a-psychoanalytic-perspective-on-reading-
literature-1st-edition-merav-roth/
ebookname.com
Women Work and Autoimmune Disease Keep Working Girlfriend
1st Edition Rosalind Joffe
https://ebookname.com/product/women-work-and-autoimmune-disease-keep-
working-girlfriend-1st-edition-rosalind-joffe/
ebookname.com
CodeIgniter for Rapid PHP
Application Development
David Upton
BIRMINGHAM - MUMBAI
CodeIgniter for Rapid PHP Application Development
Improve your PHP coding productivity with the free compact
open-source MVC CodeIgniter framework!
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847191-74-8
www.packtpub.com
Reviewers Indexer
Rick Ellis Bhushan Pangoankar
Derek Allard
Proofreader
Development Editor Chris Smith
Douglas Peterson
Production Coordinator
Assistant Development Editor Shantanu Zagade
Nikhil Bangera
Cover Designer
Technical Editor Shantanu Zagade
Ajay S
Editorial Manager
Dipali Chittar
About the Author
I’d like to thank Rick Ellis for writing CI and for making it available,
free. This spirit of generosity with such valuable intellectual
property is what makes the Open Source movement a success, and
an example to the rest of us.
I’d also like to thank Rick, and Derek Allard, for undertaking a
technical review of the book and making many helpful suggestions.
Lastly, but not least, my thanks to Julia, John, and James for their
love, support, and patience.
About the Reviewers
Rick Ellis is the founder and CEO of EllisLab.com, the company that develops
CodeIgniter and several other widely used web applications. Rick Ellis has a diverse
background in media technology, having worked in creative and technical capacities
on interactive projects for Disney, to feature films for Oliver Stone, and almost every
kind of web-based project in-between.
[ ii ]
Table of Contents
My 'Display' Model 78
CI's Validation Class: Checking Data Easily 79
Set Up Validation 80
Set Up the Controller 81
Set Up the Forms 81
Summary 83
Chapter 6: Simplifying Sessions and Security 85
Starting to Design a Practical Site with CI 85
Moving Around the Site 86
Security/Sessions: Using Another CI Library Class 91
Turning Sessions into Security 94
Security 96
Summary 98
Chapter 7: CodeIgniter and Objects 99
Object-Oriented Programming 99
Working of the CI 'Super-Object' 100
Copying by Reference 103
Adding Your own Code to the CI 'Super-Object' 105
Problems with the CI 'Super-Object' 106
Summary 109
Chapter 8: Using CI to Test Code 111
Why Test, and What For? 111
CI's Error Handling Class 113
CI's Unit Test Class 115
When to Use Unit Tests 117
Example of a Unit Test 118
CI's Benchmarking Class 121
CI's Profiler Class 122
Testing with Mock Databases 123
Control and Timing 124
Summary 125
Chapter 9: Using CI to Communicate 127
Using the FTP Class to Test Remote Files 127
Machines Talking to Machines Again—XML-RPC 129
Getting the XML-RPC Server and Client in Touch with Each Other 131
Formatting XML-RPC Exchanges 132
Debugging 134
Issues with XML-RPC? 135
Talking to Humans for a Change: the Email Class 136
Summary 139
[ iii ]
Table of Contents
[ iv ]
Table of Contents
[]
Preface
This book sets out to explain some of the main features of CI. It doesn't cover them
all, or cover any of them in full detail. CI comes with an excellent on-line User Guide
that explains most things. This is downloaded with the CI files.
This book doesn't try to duplicate the User Guide. Instead it tries to make it easier for
you to pick up how the CI framework works, so you can decide whether it is right
for you, and start using it quickly.
In some places, this book goes beyond the User Guide, though, when it tries to
explain how CI works. (The User Guide is more practically oriented.) This means
that there are some fairly theoretical chapters in between the "here's how" pages. I've
found that it helps to understand what CI is doing under the hood; otherwise you
sometimes get puzzling error messages that aren't easy to resolve.
I've tried to use a 'real-world' example when showing sections of CI code. I want
to show that CI can be used to develop a serious website with a serious purpose.
I'm currently running several websites for clients, and I want a program that will
monitor them, test them in ways I specify, keep a database of what it has done, and
let me have reports when I want them.
The examples in this book don't show it in full detail, of course: but they do, I hope,
demonstrate that you can use CI to make pretty well any common coding simpler,
and some uncommon stuff as well.
This book steps you through the main features of CodeIgniter in a systematic way,
explaining them clearly with illustrative code examples.
Preface
Chapter 2 explains what happens when you install the site, and which files will be
created. It gives a detailed overview of the required software, and explains the basic
configuration of CodeIgniter.
Chapter 3 explains how MVC helps to organize a dynamic website. It goes further
to explain the process by which CodeIgniter analyzes an incoming Internet request
and decodes which part of your code will handle it. Then CodeIgniter syntax rules
and the different types of files or classes you can find—or write for yourself—on a
CodeIgniter site are explained. At the end of the chapter, some practical hints on site
design are given.
Chapter 4 looks at how you set up a database to work with CodeIgniter, and then
how you use the Active Record class to manipulate the database.
Chapter 5 covers various ways of building views, how to create HTML forms quickly,
and how to validate your forms using CodeIgniter's validation class.
Chapter 6 looks at one of the basic questions affecting any website i.e. session
management and security; we also explore CodeIgniter's session class.
Chapter 7 covers the way in which CodeIgniter uses objects, and the different ways in
which you can write and use your own objects.
Chapter 8 covers CodeIgniter classes to help with testing: Unit tests, Benchmarking,
the 'profiler' and ways in which CodeIgniter helps you to involve your database in
tests without scrambling live data.
Chapter 9 looks at using CodeIgniter's FTP class and email class to make
communication easier, and then we venture into Web 2.0 territory using XML-RPC.
Chapter 10 talks about CodeIgniter classes that help in overcoming problems arising
regularly when you are building a website, for example, the date helper, the text and
inflector helpers, the language class, and the table class.
Chapter 11 looks at several useful CodeIgniter functions and helpers: file helper,
download helper, file upload class, image manipulation class, and the ZIP class.
Chapter 12 covers exploring your config files, using diagnostic tools, and potential
differences between servers, along with some notes on security.
[]
Another Random Document on
Scribd Without Any Related Topics
The White-Letter Hairstreak (Thecla w-album), Plate XII., Fig. 4.—A
smaller and, on the upper surface, a blacker insect than the last.
Excepting for a small indistinct spot in the centre, and near the outer
margin of the fore-wing, the upper surface is devoid of markings of
any kind. The under side, however, provides all the distinctive
features necessary for identification. The colour is a cool brown-grey,
the fore-wing being traversed by a white line; the hind-wing has a
similar white line, which forms a W at the basal angle; under it is a
broad orange scalloped band, edged with black and white; the
extreme outer edge is black, and this black edging scallops into the
orange band. Tail black.
The caterpillar feeds on Elm; is pale green, with yellow bars and two
rows of whitish humps along the back. It may be got by beating the
Elm in early summer. The Butterfly appears in July, but is far from
common, York being about its northern limit.
The Black Hairstreak (Thecla pruni), Plate XII., Fig. 5. —About the
same size as the last, but many individuals are smaller. The ground
colour is almost black, but near the tail are two or three conspicuous
orange spots, which are not present in w-Album. The orange band
on the under side of the hind-wing is much bolder and is edged with
black spots on both sides, the inner row of spots being partially
ringed with white; the white hairstreaks are fainter and slightly
interrupted. This is the rarest of the group, and confined to a few
localities in the South and South-East.
The caterpillar is green, with yellow spots and lines; it is found on
Sloe and Oak. The perfect insect is out in July.
The Purple Hairstreak (Thecla quercus), Plate XII., Fig. 3. —The
commonest and most widely distributed of the Hairstreaks extending
well into Scotland where, however, it is not common. The upper
surface in the male is shot with purple, while the female has a patch
on either fore-wing of a still more pronounced sheen. The under side
(Plate XIV., Fig. 8) is a cool grey; the "hairstreak" is white and
strongly defined by an inner edging of dark brown. There are also
two orange eye-spots near the tail, which in this species is rather
small.
PLATE 14
1. Pupa of Red Admiral
2. Larva of Red Admiral
3. Larva of Small White
4. New Small Skipper
5. Pupa of Small White (showing hole through which ichneumons
emerged)
6. Larva of White Admiral
7. Brown Hairstreak (under side)
8. Purple Hairstreak (under side)
9. Ringlet (under side)
The caterpillar is a reddish-brown and grey mixture, with a lighter
angular pattern along the back, and a light line along the sides. It
feeds on Oak.
I once came upon a small colony of this little butterfly flying round
some Oak-trees in Argyllshire, but not one of them came lower than
15 feet from the ground, and after trying a variety of expedients I
had to retire discomfited without a single capture. A visit to the
same spot on subsequent days failed to reveal a single specimen.
August was the month. In the South it is out in June.
The Green Hairstreak (Thecla rubi), Plate XII., Fig. 2. —The smallest
of the British Hairstreaks and a fairly common species. Deep dingy
brown above, bright emerald-green below, traversed by white
hairstreaks, although in some specimens I have taken these white
lines are absent. An elusive little butterfly, as when it settles
amongst green herbage with the wings closed it is rendered almost
invisible, so well does it harmonize with its surroundings.
The caterpillar is green, spotted and striped with yellow; it feeds on
Bramble and Broom. The butterfly is out in June generally, but I
have found it in the closing days of May in a favourable season. In
the South a second brood appears in August. It reaches as far north
as Perthshire, and is frequently met with in the West Highlands.
The Large Copper Butterfly (Polyommatus Dispar), Plate XII., Fig. 7.—I
am afraid there is now only one British locality where this fine
butterfly can be successfully pursued. Strange to say it is not one of
the few places where it was found so abundantly a century ago.
Neither is it any use going after it there with a net, or any other of
the usual appliances.
The correct place and method are no great secret, being, as it is, in
the very heart of London—to wit, Stevens’ Auction Rooms, King
Street, Covent Garden. A cheque-book there is a more reliable, and,
if properly handled, sure means of bringing a specimen into one’s
collection. I don’t suppose there is anybody now alive who
remembers having seen the Large Copper flitting about its native
Fen lands so long ago as 1850 or thereabout, for the precise date is
difficult to discover. The Large Copper has become as extinct as the
dodo or the great auk. Fortunately, many specimens are still to be
seen in old and well-preserved collections, and not a few of these
have already passed through the hands of the auctioneer. There are
various Continental “Coppers” which more or less resemble the “dear
departed.” And it is as well that the points of difference should be
well known, as these foreigners can be had for a few pence. Dispar
sells at as many pounds.
The male and female differ very much from each other, the male
being a clear scarlet copper tint, with black margins and a small
black spot in the centre of the fore-wing. The female is larger and
not so brilliant; the black marginal band on the fore-wing is broader,
and has a row of black spots in addition to the central black spot.
The hind-wings are much dingier, except for a brighter band round
the outer margin next the black outline. It was out in July and
August in the Fen lands of the south-eastern counties. Various
causes have been assigned as the reason for its disappearance.
Draining of, and burning rubbish on, these wastes, and the constant
persecution the insect had to endure from mercenary natives who,
once they discovered there was money in it—and the more money,
doubtless, the scarcer it became—all lent their quota of assistance
towards finally exterminating this fine butterfly.
The Small Copper Butterfly (Polyommatus Phlæas), Plate XII., Fig. 8.—
Less in size but hardly less brilliant in colour, the Small Copper is not
likely to share the fate of its larger relative. A lively, restless, little
imp it is, and has well earned the title of “the flea,” by which it is
known in some districts.
As it is the “only Copper we possess now,” a detailed description is
unnecessary, but I would direct the young collector’s attention to the
fact that there are some nice variations of this common little species
apt to be overlooked, perhaps the most striking being a white form,
and another and commoner one having a row of blue spots on the
upper surface of the hind-wings.
The caterpillar feeds on various species of Sorrel, and is green with
three red lines.
There are several broods in the year, but it is generally more
abundant in the autumn. Found everywhere.
The Long-Tailed Blue (Lycæna Bætica), Plate XII., Fig. 9. —While
there is no doubt this lovely little blue has been repeatedly taken on
our shores, the fact remains that we must still regard it as an
occasional visitor only. It may, and we all hope it will, yet be classed
amongst our resident fauna. From what we know of it, it seems to
have a more than usually wide range; it is recorded for Europe,
Africa, Western Asia, East Indies, and Australia. The male is a deep
blue, with two black spots just above the tails; the female shows
more brown. The under side is quite different from that of any of our
native blues, being barred and spotted in white, and two shades of
fawn-brown, with two green spots near the tail. A lookout for it may
be kept all along our south coast during July and August.
The Silver-Studded Blue (Lycæna Ægon), Plate XII., Fig. 10. —In all of
the group to which this insect belongs, numbering about ten species,
the males differ very much in colour, especially on the upper surface,
from the females. The males are nearly always blue of various
shades, and the females brown and blue in varying proportions.
In Ægon, the male is a warm violet-blue, the outer margins being
bordered with black. The female is brown shot with blue, which
becomes more intense near the outer margin of the hind-wings,
where there is a row of orange spots touching an outer row of black
spots; but these two rows may be nearly or altogether absent. The
under side (Plate XV., Fig. 4) is banded with orange and black-
spotted, the black spots being ringed with white. The silver studs are
on the outer margin of the orange band, principally on the hind-
wings. This is a fairly abundant species all over England on dry soils,
and has been met with in Scotland. The caterpillar is green,
sometimes brown, with a darker line along the back and white lines
on the sides. It feeds on Clover, Vetch, Broom, and other leguminous
plants. The butterfly is out in July and August.
The Brown Argus (Lycæna Astrarche), Plate XII., Fig. 11. —Here is a
“blue” in which both sexes are brown, a rather unusual thing. In
every other particular, however, it bears the family hall-mark. The
upper surface is dark brown, bordered with bright orange spots. The
under side (Plate XV., Fig. 6) is banded with orange and spotted with
black dots ringed with white. For the Scotch variety, Artaxerxes,
these spots are solid white, and there is in addition a white discoidal
spot on the upper side of the fore-wing. This variety is local in
Scotland, but fairly numerous where found, generally near the sea,
and plentiful all along the Ayrshire coast in June and July. It is said
to feed on Helianthemum, but has probably many other food-plants,
such as the Hemlock Stork’s-bill (Erodium cicutarium), which is
common where it flies.
The caterpillar is green, with a darker line along the back, and a pale
line on each side; head black and shining. There are many
intermediate forms between Artaxerxes and the type.
The Common Blue (Lycæna Icarus), Plate XII., Fig. 12.—Known to
everyone who sees anything at all of the country. It is the blue
butterfly, noticed even by those who hardly know a butterfly from a
bullfrog.
An intelligent little chap he is, too, with an eye for his own safety, as
I once found when I had the opportunity of observing quite a
number of them on a piece of waste ground near the sea. The
weather was dull and threatening rain, and not a butterfly was on
the wing; but I could see plenty of our common blue friend hanging
on, with closed wings, to the ends of rushes, grass-stalks, and on
thistle-tops; but always when I came within a step or two they
adroitly changed their position, putting whatever they were resting
or hanging on between us, just edging round the corner as it were,
so as to be out of sight. Apparently the idea of flying away from an
enemy was here considered as too risky under the conditions which
prevailed; the safest plan was to hide, so hide they did. It was the
funniest game of hide-and-seek I ever played. I have since seen the
small blue dragon-flies adopt the same tactics on the rushes by the
side of a pond. No wonder this little fellow is so common. In the
struggle for existence he has shown himself able and well-fitted to
survive; nevertheless I had a good time amongst them that
afternoon and boxed some fine varieties. The male bears a warm
shade of blue, and the female is from nearly black to brown, with a
blue blush spreading from the body outwards, both wings being
bordered with a row of orange and black spots, often on a ground of
white. Sometimes, too, there is a discoidal black spot edged with
white; but the females are very variable. The under side (Plate XV.,
Fig. 5) has the characteristic markings of the “blues,” and, excepting
that the female is a little darker in ground colour, both sexes are
pretty much alike.
The caterpillar is green, with a dark line on the back, and a light
yellow line on each side; it feeds on Trefoil and Clover. The perfect
insect is common everywhere from June till August.
The Clifden Blue, or Adonis Blue (Lycæna Bellargus), Plate XIII., Fig.
1.—It will be sufficient to point out the specific characters of each of
these blues without going into minute detail, which would be
wearisome, even if it were possible (which it is not) to paint in words
what Nature has painted so admirably on the butterflies’ wings. The
male Adonis is a brilliant azure blue; fringe, deep and white, and
divided into sections by black lines. Female, brown to nearly black,
with a row of orange and black spots round the base of the hind-
wing and sometimes continued faintly into the fore-wing; it is
browner on the under side than the male. Both resemble the
Common Blue very much, but the spots are scarcely so numerous or
so bold. The wings, however, are generally more ample, those of the
males being more rounded.
The caterpillar is green, with a darker line on the back, and a yellow
line on each side; spotted with orange on the back. This is a fairly
common species confined mostly to the South, where, being double-
brooded, it is out in June and August.
The Chalk-Hill Blue (Lycæna Corydon), Plate XIII., Fig. 2. —A larger
insect than the last, and the male an extremely pale iridescent blue,
which is shaded off at the margins into a black border, with a white
fringe checked with black. Female, dark brown, black and white
checked fringe; eye-spots nearly obsolete along the margin of both
wings. Under side in male almost white, shading to pale green, blue
next the body on the fore-wing; hind-wing, with a wash of pale
brown for the ground; spots black, outlined with white. A marginal
row of orange spots is confined to the hind-wing in the male, but
extends to the fore-wing in the female; the ground colour of it,
however, is a pale fawn, which sets forth the eye-spots beautifully.
The caterpillar is green, striped on the back and sides with yellow. A
decidedly southern species, frequenting the chalk downs of the
South and the Isle of Wight, or the limestone districts of the
Midlands. It is out in July and August.
The Azure Blue or Holly Blue (Lycæna Argiolus), Plate XIII., Fig. 4.—
This is a very dainty little butterfly of a deep sky-blue, with rounded
wings narrowly fringed with white, ticked with black. The female has
a broad, irregular, black border, occasionally extending well into the
wing. But the under side (Plate XV., Fig. 3) marks a new departure,
being of a very pale, shimmering blue, with only a few small, black
spots, which form an incomplete row on fore- and hind-wings.
PLATE 15
1. Brown Argus (var. Artaxerxes)
2. Brown Argus (var. Artaxerxes) (under side)
3. Azure Blue (under side)
4. Silver-Studded Blue (under side)
5. Common Blue (under side)
6. Brown Argus (under side)
7. Mazarine Blue (upper side)
8. Mazarine Blue (under side)
9. Chalkhill Blue (under side)
10. Large Blue (under side)
11. Little Blue (under side)
The caterpillar is green, with a dark line on the back, and a black
head. It feeds on the flowers of Holly, Ivy, and Buckthorn.
Being double-brooded, the perfect insect appears first in April and
May, and again in August. It is generally distributed in England,
though commonest in the South; not known to occur in Scotland.
The Mazarine Blue (Lycæna semiargus), Plate XV., Figs. 7 and 8.—
Males, a very dark purple-blue—in fact, this is our darkest “Blue,”
and shares the distinction with the Long-Tailed Blue of being
extremely scarce. Possibly those met with now are visitors from the
Continent. The blue deepens into a black border at the margins;
fringe short and white. Female, a uniform dark brown; under side a
pale buff colour, with an irregular row of black spots edged with
white. There are no orange spots on this species. It is said to feed
on Thrift; hence it is likeliest to be met with near the coast during
July. Good Continental specimens can be purchased cheaply, or got
by exchange. And I hold it is better to fill in your row with these,
carefully labelling them to indicate their source, than to have an
empty space always staring you in the face. Unless this species
becomes more common, the average collector’s chance of capturing
British specimens is exceedingly remote.
The Little Blue (Lycæna Minima), Plate XIII., Fig. 3.—The smallest of
our butterflies, the average expanse being only 3/4 inch. Male,
blackish-brown dusted with blue towards the base of the wings.
Female, solid brown; under side (Plate XV., Fig. 11) a pale salmon,
blue spotted as in Argiolus, with black outlined with white; no
orange spots on either sex.
The caterpillar is dull green, orange-striped on back and sides. It
feeds on Trefoils, etc. This species is local, but common all over the
British Isles, except in the extreme North. It is one of our early
species, appearing in May and June.
The Large Blue (Lycæna Arion), Plate XIII., Fig. 5.—This is the largest
of our “Blues” and the rarest of our really resident species, and
although it appears to be able to hold its own and maintain its
numbers fairly well, I would strongly urge collectors to at least let all
the “fair” and worn specimens retain their liberty. Again and again I
have seen specimens set up and sent out in exchange that should
never have been taken. Of a dark blue colour, black-bordered, Arion
can always be recognized by the row of black spots across the
middle of the fore-wing; they are sometimes very large in size.
There is occasionally a row of black spots round both wings, just
inside the margin. The under side (Plate XV., Fig. 10) is a pale grey,
gradually shading into a bright blue-green next the body, profusedly
spotted with black in white rings.
The caterpillar, which feeds on Wild Thyme in the spring, is dark
rust-coloured. The butterfly is out in July, and is found mostly in the
extreme south-west counties.
The Duke of Burgundy Fritillary (Nemeobius Lucina), Plate XIII., Fig.
6.—Very like a diminutive member of the Fritillary family, but it has
no real connection with it, and better still, it has a whole family
(Erycinidæ) and genus to itself, being the only one of its kind found
in Europe. The upper surface is a tawny orange, with dark brown
checkerings, while a row of marginal black spots runs round the
outer margins. The under side of the hind-wings has a double row of
pale, almost white, spots across the centre, and black spots, similar
to those on the upper side, round the edge.
The caterpillar is short and tapering, pale brown with a darker line
on the back, and a lighter one on the sides. It feeds on Primrose.
This species is said to be double-brooded in the South, out in June
and again in August as far north as Carlisle and the Lake District.
Note: the female has six perfect walking legs, the male only four, the
front pair being rudimentary, as with many of the larger butterflies.
The Grizzled Skipper (Syrichthus Malvæ), Plate XIII., Fig. 7. —The
Skippers, of which there are eight species in this country, are often
referred to as the connecting-link between the butterflies and moths,
and not without some justification. The antennæ are somewhat
short, club-shaped, and hooked at the extremity. The head is large,
and the antennæ spring from just above the eyes; their base is thus
wide apart. Compare a Skipper with a Blue in which the roots of the
antennæ almost touch. The body of the Skipper is stout and
mothlike, and the wings not so ample, and more angular than in the
average butterfly. The caterpillars live in a rolled leaf or several
leaves spun together, and pupate in a slight cocoon.
The Grizzled Skipper is a small butterfly measuring just over 3/4 of
an inch in expanse. The ground colour is nearly black, checkered
with white square spots, as is also the fringe. The under side is
lighter.
The caterpillar is a rusty brown, with lighter lines on the back and
sides. The species is doubled-brooded, appearing in May and
August, and is generally distributed over the country as far north as
the South-West of Scotland.
The Dingy Skipper (Nisoniades Tages), Plate XIII., Fig. 8. —This is dull
grey-brown, and very Quaker-like in its sombre garb, with a lighter
and a darker band across the wings. The under side is a pale drab,
with a few faint light spots. And truly one may be excused if at times
it is mistaken for a night-flying moth.
The caterpillar feeds on trefoil, and is green, with four yellow lines
and some black dots; it is very stout in the middle, tapering to either
end. This Skipper is also doubled-brooded, appearing in May and
August, generally on dry soils such as the chalk, or limestone, or, as
in Scotland, on the sand-dunes of Ayrshire, where it is locally
common.
The Small Skipper (Hesperia Thaumas), Plate XIII., Fig. 9. —Upper
side a uniform tawny-orange shade, with a dark brown or black
border. There is also a black dash across the fore-wing of the male,
which is absent in the female. On the under side there is a tawny
patch along the inner margin of the hind-wing, and the tip of the
fore-wing is light. These are good identification points, as they are
fairly stable.
The caterpillar is green, with two white lines on the back and a
yellow line on either side. It feeds on grasses in the spring. The
butterfly appears in July and is common in England, but is not
known in Scotland.
The New Small Skipper (Hesperia Lineola), Plate XIV., Fig. 4.—Is very
like the last, so much so, that it had been taken for many years by
collectors and confused with Thaumas. There were few collections
that did not possess a mixed series. But once its identity was
established, it was soon placed in its rightful position. It may be
distinguished from Thaumas by the absence of the fulvous patch on
the inner margin of the under side of the hind-wings, and also by
the absence of the light tip on the under side of the fore-wing. The
black dash across the upper side of the fore-wing of the male is
fainter, shorter, and more often altogether absent. The under side of
the hind-wing is a light buff without marks of any kind.
The caterpillar is a bronze-green, with four yellow lines on the back
and one on the sides; it feeds on grasses in damp meadows, mostly
in the south and south-eastern counties. The species is local, but
common where it occurs. Out in July and August.
The Lulworth Skipper (Hesperia Actæon), Plate XIII., Fig. 10. —An
extremely local species, being only found in two or three localities on
the south coast. It may be distinguished from the two preceding
Skippers, first, by its more dingy colour; second, by the female
having a semicircular row of light spots near the tip of the fore-wing.
These are very faintly visible in some males, but they have, in
addition, a black streak along the centre of the wing. The under side
in both sexes is similar, a pale dingy fawn, with no particular
markings. The antennæ are very short.
The caterpillar is green, with a dark line on the back, and a double
line of yellow on each side. This species may be looked for on rough
ground facing the sea during July and August.
The Large Skipper (Hesperia Sylvanus), Plate XIII., Fig. 11. —Upper
surface tawny-orange shading into darker at the margin of both
wings; on this dark margin are a few pale spots, mostly at the tip of
the fore-wing. The male has an almost black streak near the centre
of the fore-wing; this is not present in the female. The under side is
a light tawny olive, with pale lighter spots.
The caterpillar is green, with a dark line on the back, and a light
stripe on the sides. It is a grass-feeder. This Skipper is abundant all
over England in May and again in August, but is rare in Scotland.
The Pearl Skipper (Hesperia Comma), Plate XIII., Fig. 12. —This
species is not quite so large as the last. It is darker, and the spot
markings are much brighter and more decided. This is the case
especially on the under side, as there the spots are bright enough to
suggest pearls. Hence the name.
Note, too, the dark streak in the middle of the fore-wing of the male;
it is divided along the centre by a white line. This white line is
wanting in the Large Skipper. The dark streak is only on the upper
wings of the males. Comma is also a more local and scarce insect,
being confined mostly to the South of England.
The caterpillar is greyish-red, and has a double dark line on either
side; it feeds on various Vetches and Trefoils. The butterfly is out in
July and August.
The Checkered Skipper (Carterocephalus Palæmon), Plate XIII., Fig. 13.
—The upper side of this butterfly is speckled and bordered with
tawny-orange spots on a dark brown ground. The under side has a
lighter ground colour, and the spots are outlined with dark brown.
The caterpillar is dark, almost black, with a yellow line on the sides,
and, as it hibernates over the winter, may be looked for in the
spring. It feeds on grasses and Plantain.
This is a very local species, and I am afraid, to judge from reports,
becoming rarer. The south and south-eastern counties are the
favoured localities.
The Milkweed Butterfly (Danais Erippus; variety, Archippus), Plate
VIII., Fig. 3.—This is an American species, but an occasional visitor
to our shores, and, as it is a strong-flying species with the bump of
adventure abnormally developed, it is now met with in many lands
where it was at one time unknown. I have large fine specimens from
Canada, so it can stand the rigours of the Canadian winter; and if it
should find a suitable food-plant for the caterpillars here, we may
hope, in the near future, to add this fine butterfly to the select little
band of British butterflies.
INDEX
British Butterflies described, 29
Butterflies, antennæ of, 1, 10
capture and preservation, 13
eyes of, 11
how to kill, 16
list of British, 27
sense and smell, 10
sight, 10
tongues of, 12
Butterfly net, 14
Collection, storing of, 25
Drying-case, 22
Entomological pins, 17
Families of Butterflies.
Apaturidæ, 28
Erycinidæ, 29
Hesperidæ, 29
Lycenidæ, 28
Nymphalidæ, 27
Papilionidæ, 27
Pieridæ, 27
Satyridæ, 28
“Grease,” treatment of, 17
Ichneumons, 5
Larvae, preservation of, 22
Lepidoptera, 1
Life-story of Butterflies, 1
Pins, entomological, 17
Scales, 9
Setting boards, 18
bristle, 18
needle, 19
Paisley method, 20
with braces, 18
Species of Butterflies:
Blue, Adonis, 79
Azure, 80
Chalkhill, 80
Clifden, 79
Common, 78
Holly, 80
Large, 82
Little, 81
Long-tailed, 76
Mazarine, 81
Silver-studded, 76
Brimstone, 41
Brown Argus, 77
Camberwell Beauty, 55
Clouded Yellow, 39
Pale, 38
Comma, 51
Copper, Large, 74
Small, 75
Fritillary, Duke of Burgundy, 82
Dark Green, 44
Glanville, 49
Greasy, 48
Heath, 51
High Brown, 46
Pearl-bordered, 43
Queen of Spain, 44
Silver-washed, 47
Small Pearl-bordered, 42
Grayling, 65
Hairstreak, Black, 72
Brown, 71
Green, 73
Purple, 72
White-letter, 71
Meadow Brown, 67
Small, 67
Milkweed, 87
Orange-tip, 37
Painted Lady, 58
Peacock, 55
Purple Emperor, 59
Red Admiral, 56
Ringlet, 68
Marsh, 69
Mountain, 62
Scotch Argus, 62
Skipper, Checkered, 87
Dingy, 84
Grizzled, 83
Large, 86
Lulworth, 85
New Small, 85
Pearl, 86
Small, 84
Small Heath, 70
Speckled Wood, 64
Swallow Tail, 29
Tortoiseshell, Large, 52
Small, 53
Wall Brown, 65
White Admiral, 59
Bath, 36
Black-veined, 32
Green-veined, 35
Large Garden, 33
Marbled, 61
Small Garden, 34
Wood, 38
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.
ebookname.com