Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
PHP module H307
Web2 and caching
Exercises, examples and other material relating to training module H307. This topic is presented on public course PHP Techniques

Related technical and longer articles
Using current exchange rates on a web page

Articles and tips on this subjectupdated
4627Caching results in an object for efficiency - avoiding re-calculation
Do you like to do the same thing time and time and time again? Probably not, as it's boring and inefficient. Computers don't get bored, but they can be inefficient if not programed well ... and because they don't get bored, they don't complain if they're inefficient. Imagine you have a class of ...
4136How do I post automatically from a PHP script to my Twitter account?
How can I now post automatically from a PHP script to my Twitter account? It was "all change" earlier this year as the old API was deprecated then removed, to be replaced by 1.1. This can do a lot, but there's a fearsome list of steps according to some of the documentation, it's not easy to follow, and ...
4106Web server efficiency - saving repetition through caches
A thousand to one is an impressive increase in performance. And at times it can be achieved in web based applications if you employ caching. Let's say that a user asks about... current train running on our First Great Western Coffee Shop site. They'll get a diagram like the one that's to the side here. ...
4075Further recent PHP examples
Some more examples from another recent PHP course (PHP has been "flavour of the month" although I'm moving on to a fair chunk of Python training over the next few weeks as well! PHP basics: Conditionals and loops - [here] Regular and associative arrays - [here] Application of PHP to web forms: First ...
4055Using web services to access you data - JSON and RESTful services
Rather than build database access directly into your application, you can write much more portable and maintainable code using a service / web service in which you embed the database access - or whatever else you're using for your backend data. Web services are typically accessed through HTTP or HTTPS ...
3999Handling failures / absences of your backend server nicely
It's good for your website to put a professional smile on it's face, even when it's having problems with its backend! On high traffic sites (for example - TV show and news sites), backend servers can occasionally get overloaded and you'll want your web site visitor to get a message to that effect, ...
3955Building up from a small PHP setup to an enterprise one
I've often described Well House Consultants as a "mom and pop" company - a small outfit where we provide a niche service (IT Training and a business hotel in Melksham). We make heavy use of PHP on our web sites, and it serves us very well, being quick and easy for us to code and running well on our ...
3458On this day ... one PHP script with three uses
What happened on this day in previous years? What events in history, and what was the subject of this blog? As part of a demonstration (of caching), I wrote an example script that constructed a report ... but then I wanted to use it in various ways. As a demonstration page in its own right. As a ...
3186How to add a customised twitter feed to your site
Twitter has become a useful flow of updating information - an alternative headline source from an RSS feed. How do you incorporate such a flow into your web site? There are Javascript widgets which you can incorporate into your page, available from twitter (so much less prone to spec change than a third ...
3094Setting your user_agent in PHP - telling back servers who you are
If your web page pulls information in from other sites, you'll be turning your web server into a client (browser) to those other sites - and just as your web server can identify the type of browser it's answering via the $_SERVER[HTTP_USER_AGENT] variable, so can the remote server. The default user ...
3029PHP data sources - other web servers, large data flows, and the client (browser)
As always, I've written a sprinkling of new demonstrations amongst some well-trodden example during the PHP course I'm presenting this week: There's a really short example of how you can call up another server from your own server - [here]. So much more can be made of the web by presenting and combining ...
2545Scraping content for your own page via PHP
If your PHP allows for remote URLs to be handled / read as if they were files (and that's the default), you have useful tool which lets you include the content of one web page (or part of it) within another. For example, I can "scrape" the sections of a coming on a course page and insert them into ...
2321Uploading and Downloading files - changing names (Perl and PHP)
When you are uploading a file to a server via http (in Perl or PHP), where is the file saved, and what is it called? And when you download a file, where is it saved on your local disc, and what name is it given? These are not unusual questions, but it can be hard to find the answer, as I was reminded ...
2196New Example - cacheing results in PHP for faster loading
Here's an example from the last couple of days which is fully my own work, so I can share! I was analysing a big data flow - yesterday's web log file in this case - and it was rather harsh on the server. No big shock about that - the log file's around 40Mbytes per day and I didn't have it in anything ...
1995Automated server heartbeat and health check
Occasionally - very occasionally - we may have a problem on our public facing web server that's hosted in some network operation centre or other. It could be a software glitch, or it could be an internet connectivity issue. And we need to know about it quickly! The problem is than none of us might ...
1926Flash (client) to PHP (server) - example
Hidden deep in our website, there's an example of a Flash / Flex / Actionscript that runs in the browser, but contacts the server when certain information is required. In fact, it's so deeply hidden that I had trouble finding the links for some of yesterday's delegates: An overview of Flash / Flex ...
1814Javascript/HTML example, dynamic server monitor
There are times I want to keep an eye on our servers, but I don't really want to redraw my whole browser window (or even a frame!) to do it. So I've written a Javascript application to run in my browser (source code here) that calls up a tiny piece of PHP on the server (source code here) and replaces ...
1812Starting Ajax - easy example of browser calling up server data
Ajax (Asynchronous Javascript and XML) provides a very neat way for a web page that's displayed on a browser to interact with a web server and replace just part of the page content without the need to reload the whole HTML document or Frame. It works like this: 1. The original document called up from ...
1813Ajax - going Asyncronous and what it means
This is the second part of an "easy Ajax" series - for the first installment [link here]. In the first installment, I showed you a "bare bones" example in which Javascript on a browser called up a web service to change information being displayed dynmaically - but I couldn't reall call it Ajax (more ...
1733memcached - overview, installation, example of use in PHP
Let's say you have a large database on a busy server, and queries that are eating into your resources. Would you like to be able to speed things up? It usually turns out that there are certain queries which are very frequent and which return the same results each time (or for a period of time) which ...
1647Exchange Rates - PHP with your prices in your users currency
Would you like to tell your user what your product will cost in his local currency? What a great idea, except that exchange rates change! The European Central Bank, though, makes a file of exchange rates betweenthe Euro and other currencies avaialble abnd publicly accessible, and you can pick this ...
1633Changing a screen saver from a web page (PHP, Perl, OSX)
Here's a challenge. I want to change the screen saver on a mac mini, running OSX, from a browser anywhere in the world. You may well ask why ... the screen of the mac mini is to be visible at Well House Manor where it will provide an information screen at the front door when it's not otherwise in ...
Examples from our training material
a_logshow.php   Log file analysis (2) - code optimised for readability
a_papershow.php   Log file analysis (3) - results cached for run time efficiency
a_timbershow.php   Log file analysis (1) - base case - functioning but poorly structured
ajax123.html   JavaScript to load data from server
ajax456.html   Asyncronous call from Javascript on client to PHP on server
ajaxcode.php   Web Service provider - first Ajax demo ajax123.html
ajaxstatus.html   Ajax demonstration - a dynamically updating status page.
caching   Caching in an object
cademo.php   Caching between pages via memcached
client.php   Service layer - sample client
currency.inc   Currency abbreviations and names
exr.php   Grab exchange rates to/from Euro
hb.php   Heartbeat script to check server
ostell.php   Demonstration of cached resource
phping.php   Heartbeat script to watch vital server
prod.php   Web Site performance test page
proxydown.php   Redirecting failed proxy request to valid page
pset.php   Setting the User Agent in your PHP code
rs.php   Web service to give user current server stats
scraper.php   Scraping a remote URL content
sendimage.php   Serve a download from a database
service.php   Service layer demonstration
train_graphic.php   Display info from application server on an image
train_pixelreport.php   An easy way to add an image point to a file
twitblog.php   Twitter feed from your PHP program
xavier.php   demonstration of caching
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Calling in other online resources.
Databases and RSS feeds.
Making effiecient use of remote feeds.
Flash getting information from the server.
Ajax and Javascript validation.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/H307.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb