PHP GeoIP Primer Tutorial

PHP GeoIP Primer Tutorial

PHP GeoIP Primer Tutorial

Today, we wanted to enter the world of GeoIP, which, as the name suggests, is gleaning information about the “where” of life given an …

  • IP address … known directly … or discernible via a …
  • domain or host name

… making use of databases provided by the great MaxMind open source resource we established an account with, allowing us to download database CSV data (for our desires) that is updated on a regular basis.

Originally we thought we’d be using PHP to host Python …


# getting us, on AlmaLinux, installing via ...
$ dnf list *geo*ip*
$ dnf install python3-geoip2
$ pip install python-geoip
$ pip install python-geoip-geolite2
$ pip3 install maxminddb
$ pip3 install maxminddb-geolite2

… and then register with MaxMind after this, to help make this solution happen, but ended up combining the (just) PHP supervision of …

  • ping … means (via PHP shell_exec), as required, to derive an IP address from a host or domain name … then …
  • PHP … means by which MaxMind CSV files are scoured to link IP address to geodata of interest, to derived City and Country of interest information

… via a first draft …


<?php
// geoip_hostname.php
// RJM Programming
// September, 2024
// Thanks to GeoIP

$city='';
$country='';
$state='';
$ccode='';
$tzplace='';
$continent='';
$newhname='';
$preresults='';
$results='';
$hname='';
$via='';
if (isset($_GET['via']) || isset($_POST['via'])) {
$via='' . (isset($_GET['via']) ? str_replace('+',' ',urldecode($_GET['via'])) : '') . (isset($_POST['via']) ? str_replace('+',' ',urldecode($_POST['via'])) : '');
}
if (isset($_GET['hostname']) || isset($_POST['hostname'])) {
$hname='' . (isset($_GET['hostname']) ? str_replace('+',' ',urldecode($_GET['hostname'])) : '') . (isset($_POST['hostname']) ? str_replace('+',' ',urldecode($_POST['hostname'])) : '');
if ($via == $hname) { $via=''; }
}

if (trim($hname) != '') {
if (substr(trim($hname),0,1) < '0' || substr(trim($hname),0,1) > '9') {
if (strpos($hname, '//') === false) {
$hname='http://' . $hname;
} else if (strpos($hname, ':') === false) {
$hname='http:' . $hname;
}
//$bigcont=file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ip_example.py');
//file_put_contents('/tmp/ip_example_ours.py', str_replace(explode("'", explode("url = '", $bigcont)[1])[0], $hname, $bigcont));
//echo '/usr/bin/python ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'test_geoip.py --hostname=' . $hname;
//exit;
if (1 == 1) {
$results=shell_exec('ping -c 4 ' . str_replace('http://','',$hname));
} else {
$results=shell_exec('/usr/bin/python ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'test_geoip.py --hostname=' . str_replace('http://','',$hname));
}
if (strpos($results, 'PING ' . str_replace('http://','',$hname) . ' (') !== false) {
$newhname=explode(" ",explode(")",trim(explode('PING ' . str_replace('http://','',$hname) . ' (', $results)[1]))[0])[0];
$results='';
} else if (strpos($results, 'IP address:') !== false) {
$newhname=explode(" ",explode("\n",trim(explode('IP address:', $results)[1]))[0])[0];
$results='';
}
} else if ($hname != '') {
if ($via != '' && (substr(trim($via),0,1) < '0' || substr(trim($via),0,1) > '9')) {
$preresults='Looking up ' . $via . " ( " . $hname . " ) ";
} else {
$preresults='Looking up ' . $hname;
}
$gnames=',';
foreach (glob('/tmp/GeoLite2-City-CSV_20240920/GeoLite2-City-Blocks-IP*.csv') as $fname) {
$fgc='';
if (1 == 1) {
$fgc="\n" . shell_exec('fgrep "' . $hname . '/" ' . $fname) . "\n";
} else {
$fgc="\n" . file_get_contents($fname) . "\n";
}
$listis="\n" . $fgc . "\n";
if (strpos($listis, "\n" . $hname . "/") !== false) {
$lis=explode("\n" . $hname . "/", $listis);
for ($ii=1; $ii<sizeof($lis); $ii++) {
$cols=explode(',',$lis[$ii]);
if ($cols[1] != '') {
if (strpos($gnames, ',' . $cols[1] . ',') === false) {
$gnames.=$cols[1] . ',';
}
}
}
}
}
if ($gnames != ',') {
$garr=explode(',', substr($gnames,1,(-2 + strlen($gnames))));
foreach (glob('/tmp/GeoLite2-City-CSV_20240920/GeoLite2-City-Locations-*.csv') as $fname) {
for ($jj=0; $jj<sizeof($garr); $jj++) {
$fgc='';
if (1 == 1) {
$fgc="\n" . shell_exec('fgrep "' . $garr[$jj] . '," ' . $fname) . "\n";
} else {
$fgc="\n" . file_get_contents($fname) . "\n";
}
$listis="\n" . $fgc . "\n";
if (strpos($listis, "\n" . $garr[$jj] . ",") !== false) {
$lis=explode("\n" . $garr[$jj] . ",", $listis);
for ($ii=1; $ii<sizeof($lis); $ii++) {
$cols=explode(',',$lis[$ii]);
if ($cols[3] != '') {
if ($ccode == '') { $ccode='<table border=1 style=width:80%;><tr><td>'; }
$ccode.=' ' . str_replace('"','',$cols[3]) . '</td><td>';
}
if ($cols[4] != '') {
if ($country == '') { $country='<table border=1 style=width:80%;><tr><td>'; }
$country.=' ' . str_replace('"','',$cols[4]) . '</td><td>';
}
if ($cols[9] != '') {
if ($city == '') { $city='<table border=1 style=width:80%;><tr><td>'; }
$city.=' ' . str_replace('"','',$cols[9]) . '</td><td>';
}
if ($cols[6] != '') {
if ($state == '') { $state='<table border=1 style=width:80%;><tr><td>'; }
$state.=' ' . str_replace('"','',$cols[6]) . '</td><td>';
}
if ($cols[11] != '') {
if ($tzplace == '') { $tzplace='<table border=1 style=width:80%;><tr><td>'; }
$tzplace.=str_replace(' NA',' ',' ' . str_replace('"','',$cols[1])) . '</td><td>';
}
if ($cols[2] != '') {
if ($continent == '') { $continent='<table border=1 style=width:80%;><tr><td>'; }
$continent.=' ' . str_replace('"','',$cols[2]) . '</td><td>';
}
}
}
}
$results="<br><br>City: " . ($city == '' ? $city : $city . '</td></tr></table>') . "\nState: " . ($state == '' ? $state : $state . '</td></tr></table>') . "\nCountry: " . ($country == '' ? $country : $country . '</td></tr></table>') . "\nCountry Code: " . ($ccode == '' ? $ccode : $ccode . '</td></tr></table>') . "\nContinent: " . ($continent == '' ? $continent : $continent . '</td></tr></table>') . "\nTimezone: " . ($tzplace == '' ? $tzplace : $tzplace . '</td></tr></table>') . "<br><br>";
}
}
}
}

echo "<html>
<head>
<title>Hostname Lookup geoip_hostname.php - RJM Programming - September, 2024</title>
</head>
<body onload=\" if (document.getElementById('hostname').value != '') { setTimeout(function() { document.getElementById('blook').click(); }, 2000); } \">
<h1>Hostname Lookup</h1>
<h3>RJM Programming - September, 2024 ... thanks to <a target=_blank title=MaxMind href='//www.maxmind.com/'>MaxMind</a></h3>
<div id=results>" . $preresults . str_replace("\n","<br>",$results) . "</div><br><br>
<form method=POST action=./geoip_hostname.php>
<input style=width:80%; type=text name=hostname id=hostname placeholder='Enter host name or domain name or host IP address to show information regarding ...' value='" . $newhname . "'></input><br><br>
<input type=hidden name=via id=via value='" . $hname . "'></input>
<input type=submit id=blook value=Lookup></input>
</form>
</body>
</html>";

exit;
?>

… in a first draft GeoIP using PHP web application you can also try below

If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , , , , | Leave a comment

PHP Pspell Extension Sentence Spell Checker Tutorial

PHP Pspell Extension Sentence Spell Checker Tutorial

PHP Pspell Extension Sentence Spell Checker Tutorial

Thinking on how to progress from yesterday’s PHP Pspell Extension Word Spell Checker Primer Tutorial start …

  • An English sentence is just word(s).
  • An English sentence involves punctuation.
  • An English sentence might include “numerical words”.

… are all valid considerations, the first the clue to how we progress from “a single word” scenario to a “looping through the sentence word(s)” scenario that is the major step forward, the other two being “the constraints” (within the remit of your project plan) if you will, or the niceties (if attended to), regarding improving our changed second draft small PHP Pspell Sentence Checker web application you can also try below


<?php
// pspell_test.php
// RJM Programming
// September, 2024
// Thanks to https://www.php.net/manual/en/function.pspell-check.php
$results='';
$prefix='';
$midbit='';
$lb='';
$suffix='';
$cstring=" ... This is a valid spelling";
$wstring=" ... Sorry, wrong spelling";
if (isset($_GET['testwords']) || isset($_POST['testwords'])) {
$pspell = pspell_new("en");
$sentence=str_replace("’","'",('' . trim("" . (isset($_GET['testwords']) ? str_replace('+',' ',urldecode($_GET['testwords'])) : '') . (isset($_POST['testwords']) ? str_replace('+',' ',urldecode($_POST['testwords'])) : ''))) . '');
$origwords=explode(' ',trim($sentence));
$sentence=str_replace("’","'",str_replace('~','',str_replace('?~','',str_replace('!~','',str_replace('.~','',('' . trim("" . (isset($_GET['testwords']) ? str_replace('+',' ',urldecode($_GET['testwords'])) : '') . (isset($_POST['testwords']) ? str_replace('+',' ',urldecode($_POST['testwords'])) : ''))) . '~')))));
$words=explode(' ',trim($sentence));
$finalwords=explode(' ',trim($sentence));
$fwords=explode(' ',trim($sentence));
if (sizeof($words) > 1) {
$results='<table style="border:1px dotted pink;"><tr><td>';
$suffix='</td></tr></table>';
$lb='<br>';
$midbit='</td><td>';
$cstring='&#10004;';
$wstring='&#10060;';
}

for ($jj=0; $jj<sizeof($words); $jj++) {
$finalwords[$jj]='';
$fwords[$jj]='';
for ($kk=0; $kk<strlen($words[$jj]); $kk++) {
if (substr(substr($words[$jj],$kk),0,1) >= '0' && substr(substr($words[$jj],$kk),0,1) <= '9') {
$finalwords[$jj].=substr(substr($words[$jj],$kk),0,1);
} else if (strtolower(substr(substr($words[$jj],$kk),0,1)) >= 'a' && strtolower(substr(substr($words[$jj],$kk),0,1)) <= 'z') {
$finalwords[$jj].=substr(substr($words[$jj],$kk),0,1);
$fwords[$jj].=substr(substr($words[$jj],$kk),0,1);
} else if (substr(substr($words[$jj],$kk),0,1) == '-') {
$finalwords[$jj].=substr(substr($words[$jj],$kk),0,1);
$fwords[$jj].=substr(substr($words[$jj],$kk),0,1);
} else if (substr(substr($words[$jj],$kk),0,1) == "'" && $kk != 0 && $kk != (-1 + strlen($words[$jj]))) {
$finalwords[$jj].=substr(substr($words[$jj],$kk),0,1);
$fwords[$jj].=substr(substr($words[$jj],$kk),0,1);
}
}
if (pspell_check($pspell, $finalwords[$jj] ) || $fwords[$jj] == '' || is_numeric('' . $fwords[$jj])) {
$results.="" . $origwords[$jj] . $lb . $cstring;
} else {
$results.="" . $origwords[$jj] . $lb . $wstring;
$suggestions = pspell_suggest($pspell, "" . $words[$jj]);
$results.="<br><br>";
$ii=0;
foreach ($suggestions as $suggestion) {
if (strpos($results, '<select') === false) {
$ii=2;
$results.='<select size=2><option value="">Possible spelling ...</option></select>';
} else {
$ii++;
}
$results=str_replace('</select>', '<option value="' . $suggestion . '">' . $suggestion . '</option></select>', $results);
}
if ($ii > 0) {
$results=str_replace('<select', '<select onclick="if (this.size != ' . $ii . ') { this.size=' . $ii . '; }" ', $results);
}
}
$results=str_replace('</select>', '</SELECT>', str_replace('<select', '<SELECT', $results));
$results.=$midbit;
}
$results.=$suffix;
}
echo "<html>
<head>
<style>
td {
vertical-align: top;
}
</style>
<title>Try out Pspell - RJM Programming - September, 2024</title>
</head>
<body>
<h1>Try out Pspell for English</h1>
<h3>RJM Programming - September, 2024</h3>
<h4>Thanks to <a target=_blank href='//www.php.net/manual/en/function.pspell-check.php'>php.net</a></h4>
<div id=results>" . $results . "</div><br>
<br>
<form action=./pspell_test.php method=POST>
<textarea style=width:80%; data-type=text name=testwords id=words placeholder='Type in your word(s) to check the spelling, regarding ...' value=''></textarea>
<br><br><input type=submit value=Check style=background-color:yellow;></input>
</form>
</body>
</html>";
?>

Stop Press

We realized, after the work above, multiple correcting dropdown suggestion lists were not happening, and we remedied this with our changed third draft small PHP Pspell Sentence Checker web application, here on October 1, after saying “rabbits”.


Previous relevant PHP Pspell Extension Word Spell Checker Primer Tutorial is shown below.

PHP Pspell Extension Word Spell Checker Primer Tutorial

PHP Pspell Extension Word Spell Checker Primer Tutorial

We’re interested in Spell Checking, and saw an extension called Pspell … installed here (for PHP 8.1 purposes) on AlmaLinux via …


dnf install ea-php81-php-pspell.x86_64

… which helps out in this regard, us just starting with …

  • English
  • single word

… analysis in this first draft Single English word spell checker you can also try below …

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, ESL, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

PHP Pspell Extension Word Spell Checker Primer Tutorial

PHP Pspell Extension Word Spell Checker Primer Tutorial

PHP Pspell Extension Word Spell Checker Primer Tutorial

We’re interested in Spell Checking, and saw an extension called Pspell … installed here (for PHP 8.1 purposes) on AlmaLinux via …


dnf install ea-php81-php-pspell.x86_64

… which helps out in this regard, us just starting with …

  • English
  • single word

… analysis in this first draft Single English word spell checker you can also try below …

If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , , | Leave a comment

AlmaLinux Word Dictionary Primer Tutorial

AlmaLinux Word Dictionary Primer Tutorial

AlmaLinux Word Dictionary Primer Tutorial

The joys of “plonking” (as referenced in Mac OS X Desktop Application Deployment Primer Tutorial) are in the air. Yes, there were days when to solve a problem via some sort of install procedure, just involved “plonking” (ie. copying files, as is, from one place to another).

But today, as unbelievable as we found it, “plonking” formed the basis of the solution to resurrecting …

  • AlmaLinux
  • /usr/share/dict (folder) based dictionary files (facilitating PHP based lookups used by many RJM Programming web application English (eg. Word) Games)

… means by which all manner of PHP English Word and Name and various other (web application) games, and other ESL type applications, for us here at RJM Programming, are based.

Have you become suspicious of trying any “plonking” (install) attempt as a solution to a problem? I’d say, rightly so, be suspicious (generally speaking), these days. But, to do with the context of Word Games not working on AlmaLinux, our research led us to crazily “early on” errors, and then there was us going …


$ cd /usr/share/dict # yes, the folder exists on AlmaLinux
$ ls -l
ls: No such file or directory

… totally surprising us. Guess having always had the Dictionary files there on every experience of Mac OS X or macOS or Linux system, we didn’t expect it not to be there.

The fact that the folder /usr/share/dict existed though, made us think “plonking” files from our (English speaking) macOS /use/share/dict folder to our AlmaLinux (default language English, so far empty) /usr/share/dict folder Dictionary files would not likely Rock the Boat … baby?!

And though, getting the clues for our tweaked PHP Crossword word game have become more problematic (and we need more time to fully research), yes, populating the AlmaLinux web server /usr/share/dict folder with Dictionary files helped!


Previous relevant Mac OS X Desktop Application Deployment Primer Tutorial is shown below.

Mac OS X Desktop Application Deployment Primer Tutorial

Mac OS X Desktop Application Deployment Primer Tutorial

We were really fond, in the early days of Windows, how seamless it was to what we call “plonk” (and you could say “deploy” (if you like)) bits of software (other than *.bat (which is always okay to “plonk”) such as *.exe or maybe even *.com) around your Windows “place” just by “plonking” (ie. Windows or MS DOS (x)copy) them. These were the days, presumably, before the Windows Registry wanted to know more about the goings on of software, we guess. Of course, it is harder to go around “plonking” software on Windows let alone Mac OS X. But with that latter Mac OS X, yesterday, following up on that Xcode SpriteKit Game Primer Tutorial presentation thoughts, we had occasion to want to “plonk” an Xcode SpriteKit Game “application” (in “plonking” days we’d have said “executable”, more, here) from one MacBook Pro to another, with the same Mac OS X operating system version … it has to be said … and we’re not sure if it can only work with these conditions.

Mac OS X back in the “Leopard” days, am pretty sure, was into the “Package Manager” ways … we remember that from the days of distributing Tcl/TK games in Mac OS X, and you would put a lot of the job’s work into Package Manager (installer) creation and configuration. In newer Mac OS X versions it seems Package Manager creation became less important or less supported, as with each new Mac OS X version, a previous version’s Package Manager work became obsolete, it seemed to us. So, with all this going on, how could you think to “plonk”, no matter what similarities the software versions had, with Mac OS X, in this day and age?! Surely you need an installer of some kind. But then the bits and bytes are going to be the same. And that last thought is why we tried it at all, after initially thinking to AirDrop (too slow for our impatient selves) or ethernet the two MacBook Pros would be quicker (or possible, as a help). No, we ended up, successfully …

  1. our work regarding Xcode SpriteKit Game Primer Tutorial left us with a macOS (Mac OS X) desktop application on MacBook Pro “One” (which we’d built and Run in Xcode and that left an “executable” on the desktop (by now copied to the “Applications” folder) of the MacBook Pro, which we’d, separately, and later, run, and used the Two Finger Gesture -> Options -> Keep in Dock)
  2. in Finder desktop application, in the Applications folder, two finger gesture the SpriteKit Game desktop application (version in the Finder Applications directory) called “Cross Two” to go Two Finger Gesture -> Share -> Mail
  3. fill out your own email to and subject, along with the attached Mac OS X web application in Mail desktop application
  4. click Send
  5. at recipient (different) MacBook Pro (we think, maybe, needing the same Mac OS X operating system version) open Mail desktop application
  6. open new email with “Cross Two” desktop application attachment
  7. two finger gesture “Cross Two” attachment and choose Save Attachment to Applications folder
  8. open Finder desktop application to the Applications directory
  9. two finger gesture this newly created “Cross Two” desktop application and choose Open … voila … then, optionally …
  10. two finger gesture this new icon in the dock to choose Options -> Keep in Dock … should you want to easily rerun the application

We’ll leave you with a visual mock-up of the steps above in today’s tutorial picture as food for thought.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, ESL, Games, Installers, Tutorials | Tagged , , , , , , , , , , | Leave a comment

PDF to Images and Microsoft Office on AlmaLinux Tutorial

PDF to Images and Microsoft Office on AlmaLinux Tutorial

PDF to Images and Microsoft Office on AlmaLinux Tutorial

We haven’t been game to tell Lu, but, further to the recent PDF to Images on AlmaLinux HTML and XML Tutorial below, we found more FUNctionality to try, today, that being conversions to …

  • Microsoft Office conversion interfacings to
    1. Word … documents
    2. Excel … spreadsheets
    3. Powerpoint … slideshows
  • in the form of downloaded document files … created with the help of …
  • great open source products, “Pearls” of ideas whereby our supervising PHP could call on Python interfacing helper outerers … thanks …
    Open Source product Installed via …
    1. pdf2docx (Python)
    2. Spire.PDF (Python)
    3. pdf2pptx (Python)
    • pip install pdf2docx
    • pip install Spire.Pdf
    • pip install pdf2pptx

    … respectively, and quite late in the day, for Powerpoint …

… happening via ( a peace deal with Lu and ) a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application.


Previous relevant PDF to Images on AlmaLinux HTML and XML Tutorial is shown below.

PDF to Images on AlmaLinux HTML and XML Tutorial

PDF to Images on AlmaLinux HTML and XML Tutorial

Onto yesterday’s PDF to Images on AlmaLinux Video Tutorial we progress

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working
  • for browsed for PDFs got the “Video” working
  • input PDF display working
  • input PDF sharing working
  • for browsed for PDFs got the “HTML” and “XML” options working
  • in sharing functionality we need a hashtagging approach to not only sharing input PDF but other output media created via the user decisions make regarding checkboxes
  • for URL based PDFs we integrate all the options above
  • we add better “blurb” on the whole document.body

… for today’s considerable improvements via a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application, helped out by a tweaked client_browsing.htm client side file browser better honing in on “just PDF” files.

We’ve come to realize that the PDF to XML option is not such a “far fetched” concept as we once might have thought, because …

  • the initial default display of the XML is a way to extract the “just text” parts of the PDF … and with today’s work, we add …
  • a toggleable “onclick” means by which the user can alternate between that “just text” view and one that shows the “XML markup” (to get an idea of what is going on “under the hood”) with this pdftohtml conversion incarnation


Previous relevant PDF to Images on AlmaLinux Video Tutorial is shown below.

PDF to Images on AlmaLinux Video Tutorial

PDF to Images on AlmaLinux Video Tutorial

After yesterday’s PDF to Images on AlmaLinux Animated GIF Tutorial, today, we can

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working
  • for browsed for PDFs got the “Video” working
  • input PDF display working
  • input PDF sharing working

… representing slow, but forward, progress, improving the changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more HTML and XML functionality, into the future!


Previous relevant PDF to Images on AlmaLinux Animated GIF Tutorial is shown below.

PDF to Images on AlmaLinux Animated GIF Tutorial

PDF to Images on AlmaLinux Animated GIF Tutorial

We’ve progressed yesterday’s PDF to Images on AlmaLinux Primer Tutorial via …

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working

… the first stop getting anywhere being a tweaked client_browsing.htm client side HTML and Javascript inhouse helper change facilitating PDF content showing as a data URL, we found easier to deal with.

This aided and abetted a better and changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more!


Previous relevant PDF to Images on AlmaLinux Primer Tutorial is shown below.

PDF to Images on AlmaLinux Primer Tutorial

PDF to Images on AlmaLinux Primer Tutorial

We’re starting down the road migrating our Pdfimages functionality from CentOS (where it hived the work onto a local web server) to AlmaLinux where we started with …


dnf install poppler-utils.x86_64

… and then started trying to get “browsed for” PDF data into an HTML element, as a start, before it ends up at the web server in a /tmp/ file.

Codewise, so far, that’s involved a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application, helped out by a tweaked client_browsing.htm client side HTML and Javascript inhouse helper.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Installers, Operating System, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Camera iOS App Delay Making Of Helper Tutorial

Camera iOS App Delay Making Of Helper Tutorial

Camera iOS App Delay Making Of Helper Tutorial

We try, here, to “mix it up” regarding “presentation ideas” (connected to the “Making Of” some WordPress Blog Postings around here) and recently, two tutorials, namely …

  1. Bluetooth iPad Keyboard and Case Document Editing Tutorial
  2. PDF to Images on AlmaLinux HTML and XML Tutorial

… both using iOS Camera app “delayed photo” modes of use, got us realizing that two good uses of the iOS Camera app “delayed photo” mode of use could be regarding, respectively …

  1. Bluetooth iPad Keyboard and Case Document Editing Tutorial‘s animated GIF presentation showed how iOS Camera app “delayed photo” mode of use can help with iOS device based tutorials where the finger pointing contexts can help explain what is going on, better
  2. PDF to Images on AlmaLinux HTML and XML Tutorial‘s animated GIF presentation showed how iOS Camera app “delayed photo” mode of use can help with “arranged poses” for animal or pet photographs (where a couple of seconds before the photo is taken we might attract the attention of the animal)

… further to Camera iOS App Delay Primer Tutorial‘s discussion of this “delayed photo” concept.

You may also recall us using …

… presentation helpers going along similar lines of thinking.


Previous relevant Camera iOS App Delay Primer Tutorial is shown below.

Camera iOS App Delay Primer Tutorial

Camera iOS App Delay Primer Tutorial

Maybe you are of the view that the taking of photos with a mobile device should not need a “posse” of people to achieve. We concur. Today, though, we were tempted to involve a small “posse” because …

  • we had our hands (x2) full holding open a door lock outside its “casing” to show the drill hole and lock hole in the one photo using an iPhone 6’s Camera app …
  • but wanted to show the screw I’d bought at the locksmith too big for the door drill hole at the top of the shot, and have everything in focus and close up

… but I’d run out of hands! Call the mini “posse”? Organise a tripod or stand arrangement? Or use that partial clock face icon that represents a 3 second (and another represents a 10 second) delay, that the iOS Camera app provides to then have enough (of my own) hands to complete the task, ready to show to the locksmith for their perusal and advice.

The iOS Camera app can throw up other surprises you can read about at Camera and Photos iPad Full Primer Tutorial below.


Previous relevant Camera and Photos iPad Full Primer Tutorial is shown below.

Camera and Photos iPad Full Primer Tutorial

Camera and Photos iPad Full Primer Tutorial

To teach is amazing, as lots of teachers will tell you, for, at least, some of what I can think of, below …

  • you never know what will happen next (even with a Lesson Plan … or maybe because there IS a Lesson Plan)
  • you see things from another perspective
  • you have to think on your toes … or if a student has been clumsy … you have to think ABOUT your toes
  • modern students are much more likely, in the Internet age of Search Engines, know more about a topic than you do … hence, teachers are becoming, more often, the facilitators

And then there are those embarrassing backdowns, where it is only AFTER a lesson, you remember what would have worked THERE … aaaarrrgh!

Guess I’d say … why be embarrassed? … Remember, “teachers are becoming, more often, the facilitators” … it’s more that it would be good to guide a student towards an inquiring mind, and techniques to sort the wheat from the chaff … unless you’re a cow (no offense, Ferdinand).

All of this is why when a student shows you a problem, it’s always better to adopt the “fight” instinct, rather than the “flee” instinct … though will allow exits from the front vestibule for “flea” problems.

My student has an iPad, and like me, is a bit new to it. She has been enthralled by the “Camera” iPad desktop app, and who wouldn’t be? It’s fabulous, but I’ve run into the same issue we are going to outline below, which helped ME, help HER.

She came in with her iPad explaining how she was stuck not being able to take any more Photos with her “Camera” app. (Uh huh? Already had an inkling of a notion.)

Are you getting any error messages?

… this is worth asking, but the chances of a really succinct and definitive answer from most people on Earth is unlikely … “so that’s why Matt Damon is heading WHERE?”

But in the answer was the word “full”. (Uh huh huh!)

Can you show me your recent holiday snaps?

… yup … in the iPad “Photos” app … lots of beautiful flowers, so many of the same look, and these other earthy toned ones sort of brown and stony … yup … (Uh huh mmmmm!) …

… and these little video camera symbols down the bottom … let’s hit this triangle “Play” button, shall we? … Yup “Funniest Home Videos” … and that is what happened, and has happened to me too …

  1. You start the “Camera” app on your iPad
  2. You hit the round start button on the right
  3. You repeat step 2 on many occasions, taking so many great shots!

… but, the whole time you’ve had the setting choice of …

  1. Video
  2. Photo
  3. Square

… on “Video” … oops.

So in the “Photos” app of my student it was full of Videos of flowers and friends and soil samples, one soil sample Video being 1:30:09 long.

Okay, so what is the remedy, in the “Photos” app?

  1. Touch on Video (ones with the little video camera symbol at bottom)
  2. As necessary, touch the “Play” button if you want to check out whether it should be kept … otherwise …
  3. Touch the “Trash Can” icon at bottom right
  4. Touch “Delete Video?”
  5. Touch “Moments” link to get back to the list of Photos and Videos, resuming at step 1, as necessary

So, what can you do to see that it doesn’t happen too often again? Think, red button as alert, when capturing a “Video” with the “Camera” app. It might be that that is what you want to do, but the button being red is reminding you that you have set the “Camera” app mode to “Video” rather than “Photo” or “Square”.

So please see our explanatory slideshow, as necessary.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, GIMP, iOS, Photography, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

PDF to Images on AlmaLinux HTML and XML Tutorial

PDF to Images on AlmaLinux HTML and XML Tutorial

PDF to Images on AlmaLinux HTML and XML Tutorial

Onto yesterday’s PDF to Images on AlmaLinux Video Tutorial we progress

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working
  • for browsed for PDFs got the “Video” working
  • input PDF display working
  • input PDF sharing working
  • for browsed for PDFs got the “HTML” and “XML” options working
  • in sharing functionality we need a hashtagging approach to not only sharing input PDF but other output media created via the user decisions make regarding checkboxes
  • for URL based PDFs we integrate all the options above
  • we add better “blurb” on the whole document.body

… for today’s considerable improvements via a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application, helped out by a tweaked client_browsing.htm client side file browser better honing in on “just PDF” files.

We’ve come to realize that the PDF to XML option is not such a “far fetched” concept as we once might have thought, because …

  • the initial default display of the XML is a way to extract the “just text” parts of the PDF … and with today’s work, we add …
  • a toggleable “onclick” means by which the user can alternate between that “just text” view and one that shows the “XML markup” (to get an idea of what is going on “under the hood”) with this pdftohtml conversion incarnation


Previous relevant PDF to Images on AlmaLinux Video Tutorial is shown below.

PDF to Images on AlmaLinux Video Tutorial

PDF to Images on AlmaLinux Video Tutorial

After yesterday’s PDF to Images on AlmaLinux Animated GIF Tutorial, today, we can

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working
  • for browsed for PDFs got the “Video” working
  • input PDF display working
  • input PDF sharing working

… representing slow, but forward, progress, improving the changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more HTML and XML functionality, into the future!


Previous relevant PDF to Images on AlmaLinux Animated GIF Tutorial is shown below.

PDF to Images on AlmaLinux Animated GIF Tutorial

PDF to Images on AlmaLinux Animated GIF Tutorial

We’ve progressed yesterday’s PDF to Images on AlmaLinux Primer Tutorial via …

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working

… the first stop getting anywhere being a tweaked client_browsing.htm client side HTML and Javascript inhouse helper change facilitating PDF content showing as a data URL, we found easier to deal with.

This aided and abetted a better and changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more!


Previous relevant PDF to Images on AlmaLinux Primer Tutorial is shown below.

PDF to Images on AlmaLinux Primer Tutorial

PDF to Images on AlmaLinux Primer Tutorial

We’re starting down the road migrating our Pdfimages functionality from CentOS (where it hived the work onto a local web server) to AlmaLinux where we started with …


dnf install poppler-utils.x86_64

… and then started trying to get “browsed for” PDF data into an HTML element, as a start, before it ends up at the web server in a /tmp/ file.

Codewise, so far, that’s involved a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application, helped out by a tweaked client_browsing.htm client side HTML and Javascript inhouse helper.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

PDF to Images on AlmaLinux Video Tutorial

PDF to Images on AlmaLinux Video Tutorial

PDF to Images on AlmaLinux Video Tutorial

After yesterday’s PDF to Images on AlmaLinux Animated GIF Tutorial, today, we can

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working
  • for browsed for PDFs got the “Video” working
  • input PDF display working
  • input PDF sharing working

… representing slow, but forward, progress, improving the changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more HTML and XML functionality, into the future!


Previous relevant PDF to Images on AlmaLinux Animated GIF Tutorial is shown below.

PDF to Images on AlmaLinux Animated GIF Tutorial

PDF to Images on AlmaLinux Animated GIF Tutorial

We’ve progressed yesterday’s PDF to Images on AlmaLinux Primer Tutorial via …

  • for browsed for PDFs got the “Image PDF” (image extraction) working … and …
  • for browsed for PDFs got the “Animated GIF” working

… the first stop getting anywhere being a tweaked client_browsing.htm client side HTML and Javascript inhouse helper change facilitating PDF content showing as a data URL, we found easier to deal with.

This aided and abetted a better and changed php_calls_pdfimages.php Pdfimages supervisory PHP web application. Stay tuned for more!


Previous relevant PDF to Images on AlmaLinux Primer Tutorial is shown below.

PDF to Images on AlmaLinux Primer Tutorial

PDF to Images on AlmaLinux Primer Tutorial

We’re starting down the road migrating our Pdfimages functionality from CentOS (where it hived the work onto a local web server) to AlmaLinux where we started with …


dnf install poppler-utils.x86_64

… and then started trying to get “browsed for” PDF data into an HTML element, as a start, before it ends up at the web server in a /tmp/ file.

Codewise, so far, that’s involved a changed php_calls_pdfimages.php Pdfimages supervisory PHP web application, helped out by a tweaked client_browsing.htm client side HTML and Javascript inhouse helper.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment