Blog Archives

RESTful Communications: XML Request-Response

Planetary statistics relating to Pluto, displayed after a successful communication between a JavaScript client and a PHP RESTful Web Service.

This post demonstrates and describes XML communication between a JavaScript Client and a RESTful Web Service written in PHP. Images of the two major JavaScript functions that facilitate this communication are included; if the user is interested, (s)he may click on these images to enlarge them and inspect the JavaScript coding.

Tagged with: , , , ,
Posted in RESTful Communications

RESTful Communications: JSON Request-Response

JSON communication between a JavaScript client and a PHP RESTful Web Service.

This post demonstrates and explains a request-response communication between a JavaScript client and a RESTful Web Service written in PHP. JSON is used as the mode of data transport. Images display the two most important JavaScript functions that are used in this post; these images can be enlarged by clicking on them.

Tagged with: , , ,
Posted in RESTful Communications

RESTful Communications: Textual Request-Response

Statistics relating to planet Earth displayed in a bullet-pointed list, as a result of a successful communication with a RESTful Web Service.

This post demonstrates and explains how a JavaScript client can successfully communicate with a RESTful Web Service written in PHP. Planetary statistics are displayed in a bullet-pointed list upon successful request-response interaction. The JavaScript functions that facilitate this communication are displayed in image form; these images can be enlarged for closer inspection by interested users.

Tagged with: , ,
Posted in RESTful Communications

RESTful Communications: Tabular Planetary Statistics

Earth statistics served by the RESTful Web Service at https://sharedsapience.website.

This post demonstrates and explains how a JavaScript client can interact with a RESTful PHP Web Service. Tabular planetary statistics are requested and displayed by this JavaScript client, based on the user’s planetary selection. Coding examples are included.

Tagged with: , ,
Posted in RESTful Communications

RESTful Communications

RESTful Web Service: Pluto statistics in 'json' format.

This post provides information relating to a RESTful Web Service that has been created at https://sharedsapience.website/bespoke_php-files/planetary_statistics.php.

Tagged with: ,
Posted in RESTful Communications

PHP Quiz: All Date/Time Functions

Comprehensive PHP DateTime Quiz, sized for desktop viewing.

This post serves as a reference point for 48 PHP date/time functions. Users can also click a ‘RANDOMIZE’ button, whereupon all the function descriptions, function syntaxes, and function return values are randomized. The user can then rearrange the table cells correctly (thus completing the quiz) or click an ‘AUTO COMPLETE’ button (following further optional manual randomization) and watch the computer complete the quiz itself! The computer completes the quiz at a speed that the human eye can follow, thus aiding learning.

Tagged with: , , , ,
Posted in PHP Date/Time Quizzes

PHP Date/Time Function Quiz 5: DateTimeZone::getLocation(); timezone_name_from_abbr(); DateTimeZone::getName(); DateTimeZone::getOffset(); DateTimeZone::__construct(); DateTimeZone::getTransitions(); and timezone_version_get().

First row of the PHP DateTime Mini Quiz 5, sized for desktop viewing.

This post serves as a reference point for 7 PHP date/time functions: DateTimeZone::getLocation(); timezone_name_from_abbr(); DateTimeZone::getName(); DateTimeZone::getOffset(); DateTimeZone::__construct(); DateTimeZone::getTransitions(); and timezone_version_get(). Users can also click a ‘RANDOMIZE’ button, whereupon all the function descriptions, function syntaxes, and function return values are randomized. The user can then rearrange the table cells correctly (thus completing the quiz) or click an ‘AUTO COMPLETE’ button (following further optional manual randomization) and watch the computer complete the quiz itself! The computer completes the quiz at a speed that the human eye can follow, thus aiding learning.

Tagged with: , , , ,
Posted in PHP Date/Time Quizzes

PHP Date/Time Function Quiz 4: microtime(); mktime(); strftime(); strptime(); strtotime(); time(); DateTimeZone::listAbbreviations(); and DateTimeZone::listIdentifiers().

First two rows of the PHP DateTime Mini Quiz 4, sized for desktop viewing.

This post serves as a reference point for 8 PHP date/time functions: microtime(); mktime(); strftime(); strptime(); strtotime(); time(); DateTimeZone::listAbbreviations(); and DateTimeZone::listIdentifiers(). Users can also click a ‘RANDOMIZE’ button, whereupon all the function descriptions, function syntaxes, and function return values are randomized. The user can then rearrange the table cells correctly (thus completing the quiz) or click an ‘AUTO COMPLETE’ button (following further optional manual randomization) and watch the computer complete the quiz itself! The computer completes the quiz at a speed that the human eye can follow, thus aiding learning.

Tagged with: , , , ,
Posted in PHP Date/Time Quizzes

PHP Date/Time Function Quiz 3: DateTime::setTimestamp(); DateTime::getTimezone(); DateTime::setTimezone(); date(); getdate(); gettimeofday(); gmdate(); gmmktime(); gmstrftime(); idate(); and localtime().

First three rows of the PHP DateTime Mini Quiz 3, sized for desktop viewing.

This post serves as a reference point for 11 PHP date/time functions: DateTime::setTimestamp(); DateTime::getTimezone(); DateTime::setTimezone(); date(); getdate(); gettimeofday(); gmdate(); gmmktime(); gmstrftime(); idate(); and localtime(). Users can also click a ‘RANDOMIZE’ button, whereupon all the function descriptions, function syntaxes, and function return values are randomized. The user can then rearrange the table cells correctly (thus completing the quiz) or click an ‘AUTO COMPLETE’ button (following further optional manual randomization) and watch the computer complete the quiz itself! The computer completes the quiz at a speed that the human eye can follow, thus aiding learning.

Tagged with: , , , ,
Posted in PHP Date/Time Quizzes

‘SNAKE EYES’ [Dice Game]

'Snake Eyes' dice game in action.

A ‘Snake Eyes’ dice game: select your stake – £1, £2, £10, or £1000 – and roll the dice! Random numbers are retrieved from https://www.random.org/clients/http/.

Tagged with: ,
Posted in 'Snake Eyes' (Dice Game) [2018]