{"id":55957,"date":"2022-05-27T03:01:53","date_gmt":"2022-05-26T17:01:53","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55957"},"modified":"2022-06-07T14:53:31","modified_gmt":"2022-06-07T04:53:31","slug":"blog-posting-filtering-background-date-interfacing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/blog-posting-filtering-background-date-interfacing-tutorial\/","title":{"rendered":"Blog Posting Filtering Background Date Interfacing Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/index.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Blog Posting Filtering Background Date Interfacing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/date_search.jpg\" title=\"Blog Posting Filtering Background Date Interfacing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Blog Posting Filtering Background Date Interfacing Tutorial<\/p><\/div>\n<p>We wanted to nuance the Blog Content filtering functionality of <a title='Blog Posting Filtering Background Interfacing Tutorial' href='#bpfbit'>Blog Posting Filtering Background Interfacing Tutorial<\/a> by &#8230;<\/p>\n<ul>\n<li>adding to the existant <i>word within blog posting title<\/i> filtering prowess &#8230; with &#8230;<\/li>\n<li><i>date (YYYYMMDD) based date filtering<\/i> of blog posting<\/li>\n<\/ul>\n<p> &#8230; and needed to purloin <font size=1>(good ol&#8217;)<\/font> WordPress codex 404.php PHP code functionality changes below &#8230;<\/p>\n<p><code><br \/>\n29d28<br \/>\n&lt;   $mbd=\"\";<br \/>\n32,148d30<br \/>\n&lt;       \/\/file_put_contents('zac.zac', $_SERVER['QUERY_STRING']);<br \/>\n&lt;   if (isset($_GET['mustbedated'])) {<br \/>\n&lt;     $mbd=str_replace('+',' ',urldecode($_GET['mustbedated']));<br \/>\n&lt;     $mzs=explode(\" \", $mbd);<br \/>\n&lt;     if (sizeof($mzs) &gt; 1) {<br \/>\n&lt;       $newid=\"\";<br \/>\n&lt;       $suffn=\"\";<br \/>\n&lt;       if (strpos($mbd, \")\") !== false) { $suffn=\")\"; }<br \/>\n&lt;       for ($imzs=0; $imzs&lt;sizeof($mzs); $imzs++) {<br \/>\n&lt;         if (substr($mzs[$imzs],0,1) == '(') {<br \/>\n&lt;           $newid='(' . $newid;<br \/>\n&lt;           $mzs[$imzs]=substr($mzs[$imzs],1);<br \/>\n&lt;         }<br \/>\n&lt;         if ($mzs[$imzs] != '') {<br \/>\n&lt;           if (1 == 1 || (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9')) {<br \/>\n&lt;             if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 4) {<br \/>\n&lt;               $newid.=str_replace(')','',$mzs[$imzs]);<br \/>\n&lt;             } else if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 8) {<br \/>\n&lt;               $newid.=str_replace(')','',$mzs[$imzs]);<br \/>\n&lt;             } else if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 2 && strlen($newid) &gt;= 4) {<br \/>\n&lt;               $newid.=str_replace(')','',$mzs[$imzs]);<br \/>\n&lt;             } else if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 2) {<br \/>\n&lt;               $suffn=str_replace(')','',$mzs[$imzs]) . $suffn;<br \/>\n&lt;             } else if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 1 && strlen($newid) &gt;= 4) {<br \/>\n&lt;               $newid.='0' . str_replace(')','',$mzs[$imzs]);<br \/>\n&lt;             } else if (substr($mzs[$imzs],0,1) &gt;= '0' && substr($mzs[$imzs],0,1) &lt;= '9' && strlen(str_replace(')','',$mzs[$imzs])) == 1) {<br \/>\n&lt;               $suffn='0' . str_replace(')','',$mzs[$imzs]) . $suffn;<br \/>\n&lt;<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'jan') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='01';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='01' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'feb') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='02';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='02' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'mar') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='03';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='03' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'apr') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='04';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='04' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'may') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='05';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='05' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;           } else if (strpos(strtolower($mzs[$imzs]), 'jun') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='06';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='06' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'jul') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='07';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='07' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'aug') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='08';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='08' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'sep') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='09';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='09' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'oct') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='10';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='10' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'nov') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='11';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='11' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             } else if (strpos(strtolower($mzs[$imzs]), 'dec') !== false) {<br \/>\n&lt;               if (strlen($newid) &gt;= 4) {<br \/>\n&lt;                 $newid.='12';<br \/>\n&lt;               } else {<br \/>\n&lt;                 $suffn='12' . $suffn;<br \/>\n&lt;               }<br \/>\n&lt;             }<br \/>\n&lt;<br \/>\n&lt;           }<br \/>\n&lt;         }<br \/>\n&lt;       }<br \/>\n&lt;       $newid.=$suffn;<br \/>\n&lt;       if ($newid != \"\") { if (strlen($newid) == 8) { $mbd='(' . $newid . ')';  } else { $mbd=$newid; }  }<br \/>\n&lt;     }<br \/>\n&lt;       if (strlen($mbd) == 8) { $mbd='(' . $mbd . ')';  }<br \/>\n&lt;       \/\/file_put_contents('zab.zab', $mbd . ' ... ' . $mc);<br \/>\n&lt;     if (strpos($icontis, $mbd) !== false && sizeof($ideaarray) &gt; 1) {<br \/>\n&lt;       $mc=$mbd;<br \/>\n&lt;       $iicontis=substr(explode($mc, $icontis)[0],-500,500) . $mc . explode($mc, $icontis)[1];<br \/>\n&lt;       $ideaarray=explode('&amp;pp=&amp;pn=&amp;title=', $iicontis);<br \/>\n&lt;       \/\/file_put_contents('zaa.zaa', $ideaarray[1]);<br \/>\n&lt;     }<br \/>\n&lt;   }<br \/>\n153,155c35,36<br \/>\n&lt;     if (isset($_GET['mustcontain']) || $mc != \"\") {<br \/>\n&lt;     if (strlen(trim($_GET['mustcontain'])) &gt; 0 || $mc != \"\") {<br \/>\n&lt;       if ($mc == \"\") {<br \/>\n---<br \/>\n&gt;     if (isset($_GET['mustcontain'])) {<br \/>\n&gt;     if (strlen(trim($_GET['mustcontain'])) &gt; 0) {<br \/>\n157,158d37<br \/>\n&lt;       }<br \/>\n&lt;       \/\/file_put_contents('zaq.zaq', $mc);<br \/>\n161c40<br \/>\n&lt;       if (@preg_match($mc, null) === false || $mbd != \"\") { \/\/ not regexp<br \/>\n---<br \/>\n&gt;       if (@preg_match($mc, null) === false) { \/\/ not regexp<br \/>\n170,171d48<br \/>\n&lt;         } else {<br \/>\n&lt;           $mcs=explode(\",\", $mc);<br \/>\n175,178d51<br \/>\n&lt;         if ($mbd != \"\") {<br \/>\n&lt;         $numf=explode($mc, $icontis);<br \/>\n&lt;       \/\/file_put_contents('zas.zas', '' . sizeof($numf));<br \/>\n&lt;         } else {<br \/>\n180d52<br \/>\n&lt;         }<br \/>\n184d55<br \/>\n&lt;       \/\/file_put_contents('zat.zat', '' . sizeof($numf));<br \/>\n186d56<br \/>\n&lt;       \/\/file_put_contents('zad.zad', '' . sizeof($numf) . ' ... ' . $ideaarray[2]);<br \/>\n190,199c60<br \/>\n&lt;       $nmc=sizeof($ideaarray);<br \/>\n&lt;       $oned=\"&gt;\";<br \/>\n&lt;       $twod=\"'\";<br \/>\n&lt;       $threed='\"';<br \/>\n&lt;       $allok=true;<br \/>\n&lt;       if ($mbd != \"\") { $nmc=(1 + sizeof($numf)); $oned=\"&lt;\/option&gt;\";  $twod=\"&lt;\/option&gt;\";  $threed=\"&lt;\/option&gt;\"; $jmc=1;  }<br \/>\n&lt;<br \/>\n&lt;       \/\/if ($mbd != \"\") { file_put_contents('zar.zar', '' . sizeof($mcs) . ' ' . sizeof($mcss) . ' ' . $nmc . ' ' . $mbd); }<br \/>\n&lt;<br \/>\n&lt;       for ($imc=$jmc; $imc&lt;$nmc; $imc++) {<br \/>\n---<br \/>\n&gt;       for ($imc=$jmc; $imc&lt;sizeof($ideaarray); $imc++) {<br \/>\n203d63<br \/>\n&lt;       \/\/file_put_contents('zag.zag', '' . sizeof($mcs) . ' ' . sizeof($mcss) . ' ' . $imc . ' ' . $mc);<br \/>\n206c66<br \/>\n&lt;               if (strpos(str_replace('_',' ',explode($threed,explode($twod,explode($oned, $ideaarray[$imc])[0])[0])[0]), $mcs[$sdf]) === false) {<br \/>\n---<br \/>\n&gt;               if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcs[$sdf]) === false) {<br \/>\n213c73<br \/>\n&lt;               if (strpos(str_replace('_',' ',explode($threed,explode($twod,explode($oned, $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) === false) {<br \/>\n---<br \/>\n&gt;               if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) === false) {<br \/>\n220c80<br \/>\n&lt;                 if (strpos(str_replace('_',' ',explode($threed,explode($twod,explode($oned, $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) &gt; strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[-1 + $sdf])) {<br \/>\n---<br \/>\n&gt;                 if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) &gt; strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[-1 + $sdf])) {<br \/>\n232,236c92<br \/>\n&lt;           \/\/if (trim($ideaarray[$imc]) != '' && strpos($ideaarray[$imc],'(') !== false) {<br \/>\n&lt;       \/\/file_put_contents('zah.zah', '' . $mc . ' ' . $ideaarray[$imc]);<br \/>\n&lt;           \/\/}<br \/>\n&lt;           if (strpos(strtolower($ideaarray[$imc]), strtolower($mc)) !== false && $allok && ($mbd == \"\" || strpos(strtolower($ideaarray[$imc]), \"tutorial (\") !== false)) {<br \/>\n&lt;        \/\/if ($mbd != \"\") { file_put_contents('zaf.zaf', '' . $mc); }<br \/>\n---<br \/>\n&gt;           if (strpos(strtolower($ideaarray[$imc]), strtolower($mc)) !== false && $allok) {<br \/>\n243c99<br \/>\n&lt;           if (($hd % 2) == 0 || $mbd != \"\") {<br \/>\n---<br \/>\n&gt;           if (($hd % 2) == 0) {<br \/>\n265c121<br \/>\n&lt;           if (($hd % 2) == 0 || $mbd != \"\") {<br \/>\n---<br \/>\n&gt;           if (($hd % 2) == 0) {<br \/>\n275c131<br \/>\n&lt;         if (sizeof($fhuhs) == 20 || (sizeof($fhuhs) == 1 && strlen($mbd) &gt; 6)) { break; }<br \/>\n---<br \/>\n&gt;         if (sizeof($fhuhs) == 20) { break; }<br \/>\n281,282c137<br \/>\n&lt;         if (sizeof($fhuhs) == 1 && ($mbd != \"\" || $imc &gt; (sizeof($ideaarray) \/ 2))) {<br \/>\n&lt;        \/\/if ($mbd != \"\") {  $huhrand=$forcedhuh;   file_put_contents('zae.zae', '' . $mbd . ' ' . $fhuhs[0] . ' ' . $ideaarray[$fhuhs[0]]); }<br \/>\n---<br \/>\n&gt;         if (sizeof($fhuhs) == 1 && $imc &gt; (sizeof($ideaarray) \/ 2)) {<br \/>\n293d147<br \/>\n&lt;     if ($mbd == \"\") {<br \/>\n306d159<br \/>\n&lt;     }<br \/>\n308,323d160<br \/>\n&lt;     if ($mbd != \"\") {<br \/>\n&lt;       $huhrand=$fhuhs[0];<br \/>\n&lt;       \/\/file_put_contents('zan.zan', '' . $huhrand . ' ' . $ideaarray[$huhrand]);<br \/>\n&lt;     if (strpos(strtolower($ideaarray[$huhrand]), \"tutorial (\") !== false) {<br \/>\n&lt;     \/\/$ptis=str_replace('_',' ',$ideaarray[$huhrand] . \")\");<br \/>\n&lt;     $ptis=str_replace('_',' ',explode('Tutorial', explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0])[0] . \"Tutorial\");<br \/>\n&lt;       \/\/file_put_contents('zao.zao', '' . $ptis);<br \/>\n&lt;     } else if (strpos(strtolower($ideaarray[1 + $huhrand]), \"tutorial (\") !== false) {<br \/>\n&lt;     $huhrand++;<br \/>\n&lt;       \/\/file_put_contents('zau.zau', '  ' . $huhrand . ' ' . $ideaarray[$huhrand]);<br \/>\n&lt;     \/\/$ptis=str_replace('_',' ',$ideaarray[$huhrand] . \")\");<br \/>\n&lt;     $ptis=str_replace('_',' ',explode('Tutorial', explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0])[0] . \"Tutorial\");<br \/>\n&lt;       \/\/file_put_contents('zav.zav', ' ' . $ptis);<br \/>\n&lt;     }<br \/>\n&lt;       \/\/file_put_contents('zaw.zaw', '' . $ptis);<br \/>\n&lt;     } else {<br \/>\n327d163<br \/>\n&lt;     }<br \/>\n329,332c165<br \/>\n&lt;     if ($mbd != \"\") {<br \/>\n&lt;        $tdt=str_replace('(','',str_replace(')','',$mbd));<br \/>\n&lt;        $tutdate=' (' . substr($tdt,6,2) . ' ' . str_replace(\"01\",\"January\",str_replace(\"02\",\"February\",str_replace(\"03\",\"March\",str_replace(\"04\",\"April\",str_replace(\"05\",\"May\",str_replace(\"06\",\"June\",str_replace(\"07\",\"July\",str_replace(\"08\",\"August\",str_replace(\"09\",\"September\",str_replace(\"10\",\"October\",str_replace(\"11\",\"November\",str_replace(\"12\",\"December\",substr($tdt,4,2))))))))))))) . ' ' . substr($tdt,0,4) . ')';<br \/>\n&lt;     } else if (strpos($ideaarray[-1 + $huhrand], 'MyNew-') !== false) {<br \/>\n---<br \/>\n&gt;     if (strpos($ideaarray[-1 + $huhrand], 'MyNew-') !== false) {<br \/>\n335d167<br \/>\n&lt;       \/\/if ($mbd != \"\") { file_put_contents('zak.zak', '' . $tutdate); }<br \/>\n342d173<br \/>\n&lt;       \/\/if ($mbd != \"\") { file_put_contents('zam.zam', '' . $tutdate); }<br \/>\n351d181<br \/>\n&lt;        if ($mbd != \"\") { $ptis=explode(' (', $ptis)[0]; }<br \/>\n<\/code><\/p>\n<p> &#8230; in conjunction with <font color=blue>small changes<\/font> amongst the RJM Programming landing pages &#8230;<\/p>\n<p><code><br \/>\n&lt;span style=\"cursor:pointer;font-size:18px;\" title=\"Open a random date WordPress Blog post\" onclick=\"window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y','_blank','top=20,left=100,width=900,height=800');\"&gt;&amp;nbsp;&amp;#128197;&lt;\/span&gt;&lt;sup onclick=\"var thuh=prompt('Optionally enter a topic of interest you find in the relevant blog posting title where you can use comma delimiter for a list of find strings or semicolon for list of find strings in nominated order, else for no RJM Programming blog navigations click\/tap Cancel.<font color=blue> An 8 numeric YYYYMMDD entry will look at that date.<\/font>',' '); if (thuh != null) { <font color=blue>if (thuh.trim().length == 8 && thuh.trim().replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') == '') {  window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y&mustbedated=' + encodeURIComponent(thuh.trim()),'_blank','top=20,left=100,width=900,height=800');   } else<\/font> if (thuh.trim() == '') { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y','_blank','top=20,left=100,width=900,height=800'); } else { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y&mustcontain=' + encodeURIComponent(thuh),'_blank','top=20,left=100,width=900,height=800'); }  }\" style=\"cursor:pointer;font-size:8px;\" title=\"Open a random date WordPress Blog post filtered by your entered topic\"&gt;&amp;#10067;&lt;\/sup&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; to make all this happen.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/blog-posting-filtering-background-date-interfacing-tutorial\/'>Blog Posting Filtering Background Date Interfacing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='bpfbit'>Previous relevant <a target=_blank title='Blog Posting Filtering Background Interfacing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/blog-posting-filtering-background-interfacing-tutorial\/'>Blog Posting Filtering Background Interfacing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/more404.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Blog Posting Filtering Background Interfacing Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/more404.jpg\" title=\"Blog Posting Filtering Background Interfacing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Blog Posting Filtering Background Interfacing Tutorial<\/p><\/div>\n<p>With <a title='Image Pair Fitting into a Given Dimension Sources Tutorial' href='#ipfgdst'>Image Pair Fitting into a Given Dimension Sources Tutorial<\/a>, below, we identified this WordPress Blog&#8217;s TwentyTen theme&#8217;s 404.php code as (an example of) &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/image-pair-fitting-into-a-given-dimension-sources-tutorial\/'><p>\n&#8220;code lazy <font size=1>(for us)<\/font>&#8221; &#8220;intervention points&#8221; that mean most of the hard part of the job is done for you\n<\/p><\/blockquote>\n<p> &#8230; means by which we could mimic a little of the brilliant <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos'>Lorem Picsum<\/a>&#8216;s modus operandi providing a random image resource, providing our own inhouse RJM Programming WordPress Blog Posting Image resource.<\/p>\n<p>Since then, we&#8217;ve leant on that start, nuancing it to allow &#8220;filtering&#8221; of that total &#8220;RJM Programming WordPress Blog Posting Image resource&#8221; dataset via a user nominated string that should appear in the Blog Posting Title.   This led us, in <a target=_blank title='Landing Page Random Blog Post Topic Link Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-random-blog-post-topic-link-tutorial'>Landing Page Random Blog Post Topic Link Tutorial<\/a> to make the change &#8230;<\/p>\n<p><code><br \/>\n&lt;option id='MyNew-20110314' onclick='windowopen(\"\/\/www.rjmprogramming.com.au\/wordpress\/?p=58&amp;pp=&amp;pn=&amp;title=News_from_RJM_Programming\",\"_blank\"); ' value='\/\/www.rjmprogramming.com.au\/wordpress\/?p=58&amp;pp=&amp;pn=&amp;title=News_from_RJM_Programming'&gt;News from RJM Programming (20110314)&lt;\/option&gt;&lt;\/select&gt;&lt;\/span&gt;&lt;span style=\"cursor:pointer;font-size:18px;\" title=\"Open a random date WordPress Blog post\" onclick=\"window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y','_blank','top=20,left=100,width=900,height=800');\"&gt;&amp;nbsp;&amp;#128197;<font color=blue>&lt;\/span&gt;<\/font>&lt;sup<font color=blue> onclick=\"var thuh=prompt('Optionally enter a topic of interest you find in the relevant blog posting title, else for no RJM Programming blog navigations click\/tap Cancel.',' '); if (thuh != null) { if (thuh.trim() == '') { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y','_blank','top=20,left=100,width=900,height=800'); } else { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&andclickme=y&mustcontain=' + encodeURIComponent(thuh),'_blank','top=20,left=100,width=900,height=800'); }  }\"<\/font> style=\"cursor:pointer;font-size:8px;\"<font color=blue> title=\"Open a random date WordPress Blog post filtered by your entered topic\"<\/font>&gt;&amp;#10067;&lt;\/sup&gt;&lt;\/p&gt;<br \/>\n<\/code> <\/p>\n<p> &#8230; these days, on <a target=_blank title='RJM Programming Landing Page' href='\/\/www.rjmprogramming.com.au\/'>Landing Page<\/a>s appearing like <span style=\"cursor: pointer; font-size: 15px;\" title=\"Open a random date WordPress Blog post\" onclick=\"window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&amp;andclickme=y','_blank','top=20,left=100,width=900,height=800');\">&nbsp;&#128197;<\/span><sup onclick=\"var thuh=prompt('Optionally enter a topic of interest you find in the relevant blog posting title where you can use comma delimiter for a list of find strings or semicolon for list of find strings in nominated order, else for no RJM Programming blog navigations click\/tap Cancel.',' '); if (thuh != null) { if (thuh.trim() == '') { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&amp;andclickme=y','_blank','top=20,left=100,width=900,height=800'); } else { window.open('\/\/www.rjmprogramming.com.au\/ITblog\/500\/500?random=' + Math.floor(Math.random() * 19875643) + '&amp;andclickme=y&amp;mustcontain=' + encodeURIComponent(thuh),'_blank','top=20,left=100,width=900,height=800'); }  }\" style=\"cursor:pointer;font-size:8px;\" title=\"Open a random date WordPress Blog post filtered by your entered topic\">&#10067;<\/sup>, as an example of how we interface the new 404.php &#8220;background helper&#8221; changes, below, into (one example of) &#8220;forward user interfacer&#8221; user of that &#8220;background helper&#8221; with its <font color=blue>new code<\/font> parts below &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n\/\/ WordPress \"codex\" PHP comments precede<br \/>\n<br \/>\n$ioff=0;<br \/>\n$imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n$ptitle=\"Random Background Webpage Fade Tutorial<font color=blue> (10 May 2022)<\/font>\";<br \/>\n$bonl=\"\";<br \/>\n<font color=blue>$tonl=\"\";<br \/>\n$mcs=[];<br \/>\n$mcss=[];<br \/>\n$bigmc=\"\";<\/font><br \/>\n<br \/>\nfunction selectNewBlogPostingTutorialPicture() {<br \/>\n  global $imfnameafterdomainsep, $ptitle, $bonl<font color=blue>, $tonl, $mcs, $mcss<\/font>;<br \/>\n  $forcedhuh=-1;<br \/>\n  $fhuhs=[];<br \/>\n  <font color=blue>$mc=\"\";<br \/>\n  $mcs=[];<br \/>\n  $mcss=[];<br \/>\n  $isregexp=false;<br \/>\n  $numf=[];<\/font><br \/>\n  $foundipath=\"\";<br \/>\n  $icontis=file_get_contents(explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] . \"index.html\");<br \/>\n  $ideaarray=explode('&amp;pp=&amp;pn=&amp;title=', $icontis);<br \/>\n  if (sizeof($ideaarray) <font color=blue>&lt;=<\/font> 1) {<br \/>\n    $imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n    $ptitle=\"Random Background Webpage Fade Tutorial (10 May 2022)\";<br \/>\n  } else if (sizeof($ideaarray) &gt; 1) {<br \/>\n    <font color=blue>if (isset($_GET['mustcontain'])) {<br \/>\n    if (strlen(trim($_GET['mustcontain'])) &gt; 0) {<br \/>\n      $mc=str_replace('@#$','',str_replace('  ','+ ',str_replace('  @#$','++',str_replace('   ','++ ',(str_replace('+', ' ', urldecode($_GET['mustcontain']))) . '@#$'))));<br \/>\n      $bigmc=str_replace(\";\",\"*\",str_replace(\",\",\"*\",$mc));<br \/>\n      if (@preg_match($mc, null) === false) { \/\/ not regexp<br \/>\n        if (strpos($mc, \",\") !== false || strpos($mc, \";\") !== false) {<br \/>\n          if (strpos($mc, ';') !== false) {<br \/>\n          $mcss=explode(\";\", $mc);<br \/>\n          $mc=$mcss[0];<br \/>\n          } else {<br \/>\n          $mcs=explode(\",\", $mc);<br \/>\n          $mc=$mcs[0];<br \/>\n          }<br \/>\n        }<br \/>\n        $mc=strtolower($mc);<br \/>\n        $numf=explode($mc, strtolower(explode($ideaarray[0], $icontis)[1]));<br \/>\n      } else {  \/\/ regexp<br \/>\n        $isregexp=true;<br \/>\n        $numf[0]=$icontis;<br \/>\n      }<br \/>\n      if (sizeof($numf) &gt; 1 || $isregexp) { \/\/ && sizeof($numf) &lt; 10) {<br \/>\n      $jmc=(-1 + sizeof(explode('&amp;pp=&amp;pn=&amp;title=', $numf[0])));<br \/>\n      for ($imc=$jmc; $imc&lt;sizeof($ideaarray); $imc++) {<br \/>\n        if ($oktoloop) {<br \/>\n        if (!$isregexp) {<br \/>\n          $allok=true;<br \/>\n          if (sizeof($mcs) &gt; 1) {<br \/>\n            for ($sdf=1; $sdf&lt;sizeof($mcs); $sdf++) {<br \/>\n              if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcs[$sdf]) === false) {<br \/>\n                $allok=false;<br \/>\n              }<br \/>\n            }<br \/>\n          } elseif (sizeof($mcss) &gt; 1) {<br \/>\n            for ($sdf=1; $sdf&lt;sizeof($mcss); $sdf++) {<br \/>\n              if ($allok) {<br \/>\n              if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) === false) {<br \/>\n                $allok=false;<br \/>\n              } else {<br \/>\n                if (strpos(strtolower($ideaarray[$imc]), strtolower($mc)) !== false) {<br \/>\n                if (strpos(strtolower($ideaarray[$imc]), strtolower($mc)) &gt; strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf])) {<br \/>\n                $allok=false;<br \/>\n                } else if ($sdk &gt; 1) {<br \/>\n                if (strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[$sdf]) &gt; strpos(str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]), $mcss[-1 + $sdf])) {<br \/>\n                $allok=false;<br \/>\n                }<br \/>\n                }<br \/>\n                } else {<br \/>\n                $allok=false;<br \/>\n                }<br \/>\n              }<br \/>\n              }<br \/>\n            }<br \/>\n          }<br \/>\n          if ($allok) {<br \/>\n          if (strpos(strtolower($ideaarray[$imc]), strtolower($mc)) !== false && $allok) {<br \/>\n          $hd=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n          $hdd=1;<br \/>\n          if (sizeof($numf) &gt; 20) {<br \/>\n          $hdd=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n          }<br \/>\n          if (($hdd % 2) == 1) {<br \/>\n          if (($hd % 2) == 0) {<br \/>\n            array_push($fhuhs, $imc);<br \/>\n          } else {<br \/>\n            array_unshift($fhuhs, $imc);<br \/>\n          }<br \/>\n          }<br \/>\n          }<br \/>\n          }<br \/>\n        } else if ($isregexp) {<br \/>\n          \/\/$arrsp=preg_split($mc, explode(\"&gt;\", $ideaarray[$imc])[0]);<br \/>\n          \/\/$arrsp=preg_split('\/Javascript\/',  str_replace('_',' ',explode(\"&gt;\", $ideaarray[$imc])[0]));<br \/>\n          \/\/if (!$arrsp) { $arrsp=[]; }<br \/>\n          $mystr=str_replace('_',' ',explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]);<br \/>\n          if (preg_match($mc, $mystr)) { \/\/ !== false) {<br \/>\n          \/\/if (sizeof($arrsp) &gt; 1) {<br \/>\n          if ($isregexp) { file_put_contents('iregtwo.found', '\/Javascript\/' . $mc . ' ... 1 ... ' . explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]); }<br \/>\n          $hd=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n          $hdd=1;<br \/>\n          if (sizeof($numf) &gt; 20) {<br \/>\n          $hdd=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n          }<br \/>\n          if (($hdd % 2) == 1) {<br \/>\n          if (($hd % 2) == 0) {<br \/>\n            array_push($fhuhs, $imc);<br \/>\n          } else {<br \/>\n            array_unshift($fhuhs, $imc);<br \/>\n          }<br \/>\n          }<br \/>\n          } else {<br \/>\n          file_put_contents('jregtwo.found', '\/Javascript\/' . $mc . ' ... ' . ' ... ' . explode('\"',explode(\"'\",explode(\"&gt;\", $ideaarray[$imc])[0])[0])[0]);<br \/>\n          }<br \/>\n        }<br \/>\n        if (sizeof($fhuhs) == 20) { break; }<br \/>\n      }<br \/>\n      }<br \/>\n      }<br \/>\n      if (sizeof($fhuhs) &gt; 0) {<br \/>\n        $forcedhuh=$fhuhs[0];<br \/>\n        if (sizeof($fhuhs) == 1 && $imc &gt; (sizeof($ideaarray) \/ 2)) {<br \/>\n          $oktoloop=false; \/\/break;<br \/>\n        }<br \/>\n      }<br \/>\n     }<br \/>\n    }<\/font><br \/>\n    if (trim($mc) != \"\" && $forcedhuh == -1 && sizeof($numf) &lt;= 1 && sizeof($fhuhs) == 0) {<br \/>\n     $imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n     $ptitle=\"Random Background Webpage Fade Tutorial<font color=blue> (10 May 2022)<\/font>\";<br \/>\n    } else {<br \/>\n    while ($foundipath == \"\") {<br \/>\n    if ($forcedhuh &gt;= 1) {<br \/>\n    $huhrand=$forcedhuh;<br \/>\n    array_shift($fhuhs);<br \/>\n    if (sizeof($fhuhs) &gt; 0) {<br \/>\n        $forcedhuh=$fhuhs[0];<br \/>\n    } else {<br \/>\n        $forcedhuh=-1;<br \/>\n        $foundipath=\" \";<br \/>\n    }<br \/>\n    } else {<br \/>\n    $huhrand=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n    }<br \/>\n    $ptis=\"\";<br \/>\n    if (strpos(explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0], \"Tutorial\") !== false) {<br \/>\n    $ptis=str_replace('_',' ',explode('Tutorial', explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0])[0] . \"Tutorial\");<br \/>\n    }<br \/>\n    $tutdate=\"\";<br \/>\n    if (strpos($ideaarray[-1 + $huhrand], 'MyNew-') !== false) {<br \/>\n       $tdt=substr(explode('MyNew-', $ideaarray[-1 + $huhrand])[-1 + sizeof(explode('MyNew-', $ideaarray[-1 + $huhrand]))],0,8);<br \/>\n       $tutdate=' (' . substr($tdt,6,2) . ' ' . str_replace(\"01\",\"January\",str_replace(\"02\",\"February\",str_replace(\"03\",\"March\",str_replace(\"04\",\"April\",str_replace(\"05\",\"May\",str_replace(\"06\",\"June\",str_replace(\"07\",\"July\",str_replace(\"08\",\"August\",str_replace(\"09\",\"September\",str_replace(\"10\",\"October\",str_replace(\"11\",\"November\",str_replace(\"12\",\"December\",substr($tdt,4,2))))))))))))) . ' ' . substr($tdt,0,4) . ')';<br \/>\n    if (trim($mc) != \"\") {<br \/>\n        <font color=blue>if (!$isregexp) {<\/font><br \/>\n      if (strpos(strtolower($ptis), $mc) === false) { $tutdate=\"\"; }<br \/>\n        } <font color=blue>else {<br \/>\n      if (!preg_match($mc, $ptis)) { $tutdate=\"\"; }<br \/>\n        }<\/font><br \/>\n    }<br \/>\n    }<br \/>\n    $pnumis=explode('&', explode('?p=', $ideaarray[-1 + $huhrand]   )[-1 + sizeof(explode('?p=', $ideaarray[-1 + $huhrand]   ))])[0];<br \/>\n    $thisbpc=file_get_contents('https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=' . $pnumis);<br \/>\n    if (strpos($thisbpc, ' class=\"wp-caption') !== false) {<br \/>\n     $thatbpc=explode('\"', explode(' src=\"', explode(' class=\"wp-caption', $thisbpc)[1])[1])[0]; \/\/ www.rjmprogramming.com.au\/PHP\/emoji_animation_css_block.jpg<br \/>\n     if (strpos($thatbpc, \"rjmprogramming.com.au\/\") !== false) {<br \/>\n      if (strpos($thatbpc, \".jp\") !== false || strpos($thatbpc, \".png\") !== false || strpos($thatbpc, \".gif\") !== false) {<br \/>\n       if ($tutdate != \"\" && strpos($ptis, \" Tutorial\") !== false && strpos($ptis, \" (\") === false && strpos($ptis, \"%\") === false && strpos($ptis, \"&\") === false && file_exists(explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] .   explode(\"rjmprogramming.com.au\/\", $thatbpc)[1]   )) {<br \/>\n        $ptis.=$tutdate;<br \/>\n        $foundipath=explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] .   explode(\"rjmprogramming.com.au\/\", $thatbpc)[1];<br \/>\n        if ($foundipath != \"\") {<br \/>\n          $imfnameafterdomainsep=explode(\"rjmprogramming.com.au\/\", $thatbpc)[1];<br \/>\n          $ptitle=$ptis;<br \/>\n          $onlme=\"\";<br \/>\n          if (strpos(('' . $_SERVER['QUERY_STRING']), 'andclickme=') !== false) {<br \/>\n            if ($mc != \"\") {<br \/>\n              $onlme=' onload=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/ITblog\/?p=\" . $pnumis . \"','_blank','top=200,left=0,height=700,width=900'); \" . '\" ';<br \/>\n              <font color=blue>if ($isregexp) {<br \/>\n              $zis=0;<br \/>\n              $zzis=strlen($mc);<br \/>\n              if (strpos(($mc . '~'), '\/~') !== false) { $zzis--; }<br \/>\n              if (strpos(('~' . $mc), '~\/') !== false) { $zzis--; $zis=1; }<br \/>\n              $onlme=str_replace('; \"', '; window.open(' . \"'\/\/www.rjmprogramming.com.au\/itnewblog\/match\/mapper.php?pm=\" . urlencode(substr($mc,$zis,$zzis)) . \"','_blank','top=250,left=1200,height=650,width=900');  \" . '\"', $onlme);<br \/>\n              } else {<br \/>\n              $onlme=str_replace('; \"', '; window.open(' . \"'\/\/www.rjmprogramming.com.au\/itnewblog\/match\/mapper.php?pm=\" . urlencode(explode('*',$bigmc)[0]) . \"','_blank','top=250,left=1200,height=650,width=900');  \" . '\"', $onlme);<br \/>\n              }<\/font><br \/>\n            } else {<br \/>\n              $onlme=' onload=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/ITblog\/?p=\" . $pnumis . \"','_blank','top=200,left=100,height=700,width=900'); \" . '\" ';<br \/>\n            }<br \/>\n          }<br \/>\n          $bonl=$onlme . ' title=' . \"'\" . 'Click opens relevant blog post called ' . $ptis . ' and double click opens relevant blog post action item' . \"'\" . ' onclick=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/ITblog\/?p=\" . $pnumis . \"','_blank'); \" . '\" ondblclick=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/slideshow.html?title=\" . str_replace(urlencode('|'), '%20', urlencode(str_replace(' ','|',$ptis))) . \"','_blank'); \" . '\"';<br \/>\n          <font color=blue>$tonl='&lt;head&gt;&lt;title&gt;' . $ptis . '&lt;\/title&gt;&lt;\/head&gt;';<\/font><br \/>\n        }<br \/>\n       }<br \/>\n      }<br \/>\n     }<br \/>\n    }<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction createScaledImage($newWidth,$newHeight,$path,$datauri) { \/\/ thanks to <a target=_blank title='https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio' href='https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio'>https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio<\/a><br \/>\n<br \/>\n    $image_name=explode(DIRECTORY_SEPARATOR, $path)[-1 + sizeof(explode(DIRECTORY_SEPARATOR, $path))];<br \/>\n<br \/> <br \/>\n    $mime = getimagesize($path);<br \/>\n<br \/>\n    if ($mime['mime']=='image\/png') {<br \/>\n        $src_img = imagecreatefrompng($path);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n        $src_img = imagecreatefromjpeg($path);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/gif') {<br \/>\n        $src_img = imagecreatefromgif($path);<br \/>\n    }<br \/>\n<br \/>\n    $old_x          =   imageSX($src_img);<br \/>\n    $old_y          =   imageSY($src_img);<br \/>\n<br \/>\n    if ($old_x &gt; $old_y) {<br \/>\n        $thumb_w    =   $newWidth;<br \/>\n        $thumb_h    =   $old_y\/$old_x*$newWidth;<br \/>\n    }<br \/>\n<br \/>\n    if ($old_x &lt; $old_y) {<br \/>\n        $thumb_w    =   $old_x\/$old_y*$newHeight;<br \/>\n        $thumb_h    =   $newHeight;<br \/>\n    }<br \/>\n<br \/>\n    if ($old_x == $old_y) {<br \/>\n        $thumb_w    =   $newWidth;<br \/>\n        $thumb_h    =   $newHeight;<br \/>\n    }<br \/>\n<br \/>\n    $dst_img        =   imagecreatetruecolor($thumb_w,$thumb_h);<br \/>\n<br \/>\n    imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);<br \/>\n<br \/>\n    \/\/ New save location<br \/>\n    $new_thumb_loc = '\/tmp\/' . $image_name;<br \/>\n<br \/>\n    if (!$datauri) {<br \/>\n    if($mime['mime']=='image\/png') {<br \/>\n      header('Content-Type: image\/png');<br \/>\n      imagepng($dst_img); \/\/,$new_thumb_loc,8);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    } else if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n      header('Content-Type: image\/jpeg');<br \/>\n      imagejpeg($dst_img); \/\/,$new_thumb_loc,80);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    } else if ($mime['mime']=='image\/gif') {<br \/>\n      header('Content-Type: image\/gif');<br \/>\n      imagegif($dst_img); \/\/,$new_thumb_loc,80);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    }<br \/>\n    exit;<br \/>\n    }<br \/>\n<br \/>\n    $result=\"\";<br \/>\n    if ($mime['mime']=='image\/png') {<br \/>\n        imagepng($dst_img,$new_thumb_loc,8);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n        imagejpeg($dst_img,$new_thumb_loc,80);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/gif') {<br \/>\n        imagegif($dst_img,$new_thumb_loc);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n<br \/> <br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n<br \/>\n    return $result;<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; called within <font color=blue>&#8220;new if section URL analysis code&#8221;<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$uparts=explode(\"\/\", $_SERVER['REQUEST_URI']);<br \/>\nif (sizeof($uparts) &gt;= 2) {<br \/>\n  if (trim(explode('#',explode('?',$uparts[-1 + sizeof($uparts)])[0])[0]) == '') {<br \/>\n    $ioff=-1;<br \/>\n  }<br \/>\n  if (1 == 1 || ('' . $_SERVER['QUERY_STRING']) == '') {<br \/>\n    $usz=sizeof($uparts);<br \/>\n    if (str_replace('?' . $_SERVER['QUERY_STRING'],'',trim($uparts[-1 + sizeof($uparts)])) == '') { $usz--; }<br \/>\n    if ($usz == 3 && strpos($uparts[-1 + $usz], \"%20\") !== false || strpos($uparts[-1 + $usz], \"+\") !== false) { \/\/ fix \/ITblog\/Linux%20mailx%20Primer%20Tutorial\/ 18\/1\/2022 RM<br \/>\n     $oky=true;<br \/>\n     if (substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n     if (substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n     $oky=false;<br \/>\n     }<br \/>\n     }<br \/>\n     if ($oky) {<br \/>\n     if (('' . $_SERVER['QUERY_STRING']) == '') {<br \/>\n       header('Location: ' . str_replace('~``','\/ITblog\/',str_replace('\/','',str_replace('\/ITBLOG\/','~``',str_replace('\/itblog\/','~``',str_replace('\/ITblog\/','~``',str_replace('--','-',str_replace('---','-',str_replace('+','-',str_replace('%20','-',$_SERVER['REQUEST_URI']))))))))));<br \/>\n     } else {<br \/>\n       header('Location: ' . explode('?',str_replace('~``','\/ITblog\/',str_replace('\/','',str_replace('\/ITBLOG\/','~``',str_replace('\/itblog\/','~``',str_replace('\/ITblog\/','~``',str_replace('--','-',str_replace('---','-',str_replace('+','-',str_replace('%20','-',$_SERVER['REQUEST_URI']))))))))))[0] . '?' . $_SERVER['QUERY_STRING']);<br \/>\n     }<br \/>\n     exit;<br \/>\n     }<br \/>\n    }<br \/>\n  }<br \/>\n  if (str_replace(\"category\",\"cat\",strtolower($uparts[-2 + sizeof($uparts)])) == \"cat\" || strtolower($uparts[-2 + sizeof($uparts)]) == \"category\") {<br \/>\n    $catsare=[\"\",\"Not Categorised\",\"Ajax\",\"Android\",\"Animation\",\"Anything You Like\",\"Code::Blocks\",\"Colour Matching\",\"Data Integration\",\"Database\",\"Delphi\",\"Eclipse\",\"eLearning\",\"ESL\",\"Event-Driven Programming\",\"Games\",\"GIMP\",\"GUI\",\"Hradware\",\"Installers\",\"iOS\",\"Land Surveying\",\"Moodle\",\"Music Poll\",\"NetBeans\",\"Networking\",\"News\",\"ontop\",\"OOP\",\"Operating System\",\"Photography\",\"Projects\",\"Signage Poll\",\"Software\",\"SpectroPhotometer\",\"Tiki Wiki\",\"Trips\",\"Tutorials\",\"Uncategorized\",\"Visual Studio\",\"Xcode\"];<br \/>\n    for ($ibh=1; $ibh&lt;sizeof($catsare); $ibh++) {<br \/>\n      if (explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0] == strtolower($catsare[$ibh])) {<br \/>\n        if (strtolower($catsare[$ibh]) == \"ontop\") {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        } else {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        }<br \/>\n      } else if (explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0] == ('' . $ibh)) {<br \/>\n        if (strtolower($catsare[$ibh]) == \"ontop\") {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/?cat=' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        } else {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/?cat=' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  } else if (substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n    if (substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n      $uwidth=trim($uparts[$ioff - 2 + sizeof($uparts)]);<br \/>\n      $uheight=trim(explode('#',explode('?',$uparts[$ioff - 1 + sizeof($uparts)])[0])[0]);<br \/>\n      $imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n      $ptitle=\"Random Background Webpage Fade Tutorial\";<br \/>\n      selectNewBlogPostingTutorialPicture();<br \/>\n      $postingiurl=explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] . $imfnameafterdomainsep;<br \/>\n      list($iwidth, $iheight, $itype, $iattr) = getimagesize($postingiurl);<br \/>\n      $amime = getimagesize($postingiurl);<br \/>\n      if ($ioff == 0) {<br \/>\n      \/\/header('Content-Type: image\/jpeg');<br \/>\n      echo \"&lt;html&gt;\" . $tonl . \"&lt;body\" . $bonl . \"&gt;&lt;pre&gt;data:image\/jpeg;base64,\" . base64_encode(createScaledImage($uwidth,$uheight,$postingiurl,true)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . \"&lt;\/pre&gt;&lt;\/body&gt;&lt;\/html&gt;\";<br \/>\n      } else if (1 == 2) {<br \/>\n      \/\/header('Content-Type: image\/jpeg');<br \/>\n      echo '&lt;img src=\"' . \"data:image\/jpeg;base64,\" . base64_encode(file_get_contents($postingiurl)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . '\"&gt;&lt;\/img&gt;';<br \/>\n      } else {<br \/>\n      createScaledImage($uwidth,$uheight,$postingiurl,false); \/\/imagecreatefromjpeg($postingiurl);<br \/>\n      }<br \/>\n      exit;<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nget_header(); ?&gt;<br \/>\n<br \/>\n\/\/ more WordPress \"codex\" PHP code follows<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/blog-posting-filtering-background-interfacing-tutorial\/'>Blog Posting Filtering Background Interfacing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ipfgdst'>Previous relevant <a target=_blank title='Image Pair Fitting into a Given Dimension Sources Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-pair-fitting-into-a-given-dimension-sources-tutorial\/'>Image Pair Fitting into a Given Dimension Sources Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image Pair Fitting into a Given Dimension Sources Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension_rjm_source.jpg\" title=\"Image Pair Fitting into a Given Dimension Sources Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image Pair Fitting into a Given Dimension Sources Tutorial<\/p><\/div>\n<p>Thinking &#8220;layers of functionality&#8221; here, we think that progress onto yesterday&#8217;s <a title='Image Pair Fitting into a Given Dimension Primer Tutorial' href='#ipfgdpt'>Image Pair Fitting into a Given Dimension Primer Tutorial<\/a> would go &#8230;<\/p>\n<ul>\n<li>as well as the wonderful <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos'>Lorem Picsum<\/a> resource for beautiful images &#8220;source&#8221; &#8230; we might add &#8230;<\/li>\n<li>new <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/\">RJM Programming WordPress Blog<\/a> <font size=1>(that you are probably reading from, now)<\/font> tutorial picture &#8220;source&#8221; of images<\/li>\n<\/ul>\n<p> &#8230; the functionality for which we have been trying to envisage for many years, and seeing the excellent <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos'>Lorem Picsum<\/a> arrangements being a catalyst, to give it a go.<\/p>\n<p>Kludgy feeling or not, we are happy to be linking into the &#8220;last talked about&#8221; <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-search-within-search-posting-progress-context-tutorial\/' title='WordPress Blog Search Within Search Posting Progress Context Tutorial'>WordPress Blog Search Within Search Posting Progress Context Tutorial<\/a> WordPress &#8220;URL not found&#8221; 404.php code methodologies here, as a great &#8220;intervention point&#8221;.  We often find the biggest joy in web application code modifications is to identify &#8220;code lazy <font size=1>(for us)<\/font>&#8221; &#8220;intervention points&#8221; that mean most of the hard part of the job is done for you, by others (here, that being the great <a target=_blank title='WordPress blog' href='\/\/wordpress.org'>WordPress<\/a> TwentyTen theme <a target=_blank title='WordPress codex' href='https:\/\/codex.wordpress.org\/Main_Page'>&#8220;codex&#8221;<\/a> PHP code helped out by Apache web server <a target=_blank title='Apache .htaccess information' href='https:\/\/httpd.apache.org\/docs\/2.4\/howto\/htaccess.html'>.htaccess<\/a> permalink configurations) before you add your own &#8220;situation specific&#8221; interventional code.<\/p>\n<p>And so, once at 404.php code, we add new global variables and functions &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n\/\/ WordPress \"codex\" PHP comments precede<br \/>\n<br \/>\n$ioff=0;<br \/>\n$imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n$ptitle=\"Random Background Webpage Fade Tutorial\";<br \/>\n$bonl=\"\";<br \/>\n$tonl=\"\";<br \/>\n<br \/>\nfunction selectNewBlogPostingTutorialPicture() {<br \/>\n  global $imfnameafterdomainsep, $ptitle, $bonl, $tonl;<br \/>\n  $foundipath=\"\";<br \/>\n  $icontis=file_get_contents(explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] . \"index.html\");<br \/>\n  $ideaarray=explode('&amp;pp=&amp;pn=&amp;title=', $icontis);<br \/>\n  if (sizeof($ideaarray) &gt; 1) {<br \/>\n    while ($foundipath == \"\") {<br \/>\n    $huhrand=rand(2, (-1 + sizeof($ideaarray)));<br \/>\n    $ptis=\"\";<br \/>\n    if (strpos(explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0], \"Tutorial\") !== false) {<br \/>\n    $ptis=str_replace('_',' ',explode('Tutorial', explode('&gt;', explode('\"', $ideaarray[$huhrand])[0])[0])[0] . \"Tutorial\");<br \/>\n    }<br \/>\n    $tutdate=\"\";<br \/>\n    if (strpos($ideaarray[-1 + $huhrand], 'MyNew-') !== false) {<br \/>\n       $tdt=substr(explode('MyNew-', $ideaarray[-1 + $huhrand])[-1 + sizeof(explode('MyNew-', $ideaarray[-1 + $huhrand]))],0,8);<br \/>\n       $tutdate=' (' . substr($tdt,6,2) . ' ' . str_replace(\"01\",\"January\",str_replace(\"02\",\"February\",str_replace(\"03\",\"March\",str_replace(\"04\",\"April\",str_replace(\"05\",\"May\",str_replace(\"06\",\"June\",str_replace(\"07\",\"July\",str_replace(\"08\",\"August\",str_replace(\"09\",\"September\",str_replace(\"10\",\"October\",str_replace(\"11\",\"November\",str_replace(\"12\",\"December\",substr($tdt,4,2))))))))))))) . ' ' . substr($tdt,0,4) . ')';<br \/>\n    }<br \/>\n    $pnumis=explode('&', explode('?p=', $ideaarray[-1 + $huhrand]   )[-1 + sizeof(explode('?p=', $ideaarray[-1 + $huhrand]   ))])[0];<br \/>\n    $thisbpc=file_get_contents('HTTP:\/\/www.rjmprogramming.com.au\/ITblog\/?p=' . $pnumis);<br \/>\n    if (strpos($thisbpc, ' class=\"wp-caption') !== false) {<br \/>\n     $thatbpc=explode('\"', explode(' src=\"', explode(' class=\"wp-caption', $thisbpc)[1])[1])[0]; \/\/ www.rjmprogramming.com.au\/PHP\/emoji_animation_css_block.jpg<br \/>\n     if (strpos($thatbpc, \"rjmprogramming.com.au\/\") !== false) {<br \/>\n      if (strpos($thatbpc, \".jp\") !== false || strpos($thatbpc, \".png\") !== false || strpos($thatbpc, \".gif\") !== false) {<br \/>\n       if ($tutdate != \"\" && strpos($ptis, \" Tutorial\") !== false && strpos($ptis, \" (\") === false && strpos($ptis, \"%\") === false && strpos($ptis, \"&\") === false && file_exists(explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] .   explode(\"rjmprogramming.com.au\/\", $thatbpc)[1]   )) {<br \/>\n        $ptis.=$tutdate;<br \/>\n        $foundipath=explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] .   explode(\"rjmprogramming.com.au\/\", $thatbpc)[1];<br \/>\n        if ($foundipath != \"\") {<br \/>\n          $imfnameafterdomainsep=explode(\"rjmprogramming.com.au\/\", $thatbpc)[1];<br \/>\n          $ptitle=$ptis;<br \/>\n          $onlme=\"\";<br \/>\n          if (strpos(('' . $_SERVER['QUERY_STRING']), 'andclickme=') !== false) {<br \/>\n            $onlme=' onload=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/ITblog\/?p=\" . $pnumis . \"','_blank','top=200,left=100,height=700,width=900'); \" . '\" ';<br \/>\n          }<br \/>\n          $bonl=$onlme . ' title=' . \"'\" . 'Click opens relevant blog post called ' . $ptis . ' and double click opens relevant blog post action item' . \"'\" . ' onclick=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/ITblog\/?p=\" . $pnumis . \"','_blank'); \" . '\" ondblclick=\" window.open(' . \"'\/\/www.rjmprogramming.com.au\/slideshow.html?title=\" . str_replace(urlencode('|'), '%20', urlencode(str_replace(' ','|',$ptis))) . \"','_blank'); \" . '\"';<br \/>\n          $tonl='&lt;head&gt;&lt;title&gt;' . $ptis . '&lt;\/title&gt;&lt;\/head&gt;';<br \/>\n        }<br \/>\n       }<br \/>\n      }<br \/>\n     }<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction createScaledImage($newWidth,$newHeight,$path,$datauri) { \/\/ thanks to <a target=_blank title='https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio' href='https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio'>https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio<\/a><br \/>\n<br \/>\n    $image_name=explode(DIRECTORY_SEPARATOR, $path)[-1 + sizeof(explode(DIRECTORY_SEPARATOR, $path))];<br \/>\n<br \/> <br \/>\n    $mime = getimagesize($path);<br \/>\n<br \/>\n    if ($mime['mime']=='image\/png') {<br \/>\n        $src_img = imagecreatefrompng($path);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n        $src_img = imagecreatefromjpeg($path);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/gif') {<br \/>\n        $src_img = imagecreatefromgif($path);<br \/>\n    }<br \/>\n<br \/>\n    $old_x          =   imageSX($src_img);<br \/>\n    $old_y          =   imageSY($src_img);<br \/>\n<br \/>\n    if ($old_x &gt; $old_y) {<br \/>\n        $thumb_w    =   $newWidth;<br \/>\n        $thumb_h    =   $old_y\/$old_x*$newWidth;<br \/>\n    }<br \/>\n<br \/>\n    if ($old_x &lt; $old_y) {<br \/>\n        $thumb_w    =   $old_x\/$old_y*$newHeight;<br \/>\n        $thumb_h    =   $newHeight;<br \/>\n    }<br \/>\n<br \/>\n    if ($old_x == $old_y) {<br \/>\n        $thumb_w    =   $newWidth;<br \/>\n        $thumb_h    =   $newHeight;<br \/>\n    }<br \/>\n<br \/>\n    $dst_img        =   imagecreatetruecolor($thumb_w,$thumb_h);<br \/>\n<br \/>\n    imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);<br \/>\n<br \/>\n    \/\/ New save location<br \/>\n    $new_thumb_loc = '\/tmp\/' . $image_name;<br \/>\n<br \/>\n    if (!$datauri) {<br \/>\n    if($mime['mime']=='image\/png') {<br \/>\n      header('Content-Type: image\/png');<br \/>\n      imagepng($dst_img); \/\/,$new_thumb_loc,8);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    } else if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n      header('Content-Type: image\/jpeg');<br \/>\n      imagejpeg($dst_img); \/\/,$new_thumb_loc,80);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    } else if ($mime['mime']=='image\/gif') {<br \/>\n      header('Content-Type: image\/gif');<br \/>\n      imagegif($dst_img); \/\/,$new_thumb_loc,80);<br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n      exit;<br \/>\n    }<br \/>\n    exit;<br \/>\n    }<br \/>\n<br \/>\n    $result=\"\";<br \/>\n    if ($mime['mime']=='image\/png') {<br \/>\n        imagepng($dst_img,$new_thumb_loc,8);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/jpg' || $mime['mime']=='image\/jpeg' || $mime['mime']=='image\/pjpeg') {<br \/>\n        imagejpeg($dst_img,$new_thumb_loc,80);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n    if ($mime['mime']=='image\/gif') {<br \/>\n        imagegif($dst_img,$new_thumb_loc);<br \/>\n        $result = file_get_contents($new_thumb_loc);<br \/>\n    }<br \/>\n<br \/>\n    imagedestroy($dst_img);<br \/>\n    imagedestroy($src_img);<br \/>\n<br \/> <br \/>\n    if (file_exists($new_thumb_loc)) {<br \/>\n    unlink($new_thumb_loc);<br \/>\n    }<br \/>\n<br \/>\n    return $result;<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; called within <font color=blue>&#8220;new if section URL analysis code&#8221;<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$uparts=explode(\"\/\", $_SERVER['REQUEST_URI']);<br \/>\nif (sizeof($uparts) >= 2) {<br \/>\n  <font color=blue>if (trim(explode('#',explode('?',$uparts[-1 + sizeof($uparts)])[0])[0]) == '') {<br \/>\n    $ioff=-1;<br \/>\n  }<\/font><br \/>\n  if (1 == 1 || ('' . $_SERVER['QUERY_STRING']) == '') {<br \/>\n    $usz=sizeof($uparts);<br \/>\n    if (str_replace('?' . $_SERVER['QUERY_STRING'],'',trim($uparts[-1 + sizeof($uparts)])) == '') { $usz--; }<br \/>\n    if ($usz == 3 && strpos($uparts[-1 + $usz], \"%20\") !== false || strpos($uparts[-1 + $usz], \"+\") !== false) { \/\/ fix \/ITblog\/Linux%20mailx%20Primer%20Tutorial\/ 18\/1\/2022 RM<br \/>\n     if (('' . $_SERVER['QUERY_STRING']) == '') {<br \/>\n       header('Location: ' . str_replace('~``','\/ITblog\/',str_replace('\/','',str_replace('\/ITBLOG\/','~``',str_replace('\/itblog\/','~``',str_replace('\/ITblog\/','~``',str_replace('--','-',str_replace('---','-',str_replace('+','-',str_replace('%20','-',$_SERVER['REQUEST_URI']))))))))));<br \/>\n     } else {<br \/>\n       header('Location: ' . explode('?',str_replace('~``','\/ITblog\/',str_replace('\/','',str_replace('\/ITBLOG\/','~``',str_replace('\/itblog\/','~``',str_replace('\/ITblog\/','~``',str_replace('--','-',str_replace('---','-',str_replace('+','-',str_replace('%20','-',$_SERVER['REQUEST_URI']))))))))))[0] . '?' . $_SERVER['QUERY_STRING']);<br \/>\n     }<br \/>\n     exit;<br \/>\n    }<br \/>\n  }<br \/>\n  if (str_replace(\"category\",\"cat\",strtolower($uparts[-2 + sizeof($uparts)])) == \"cat\" || strtolower($uparts[-2 + sizeof($uparts)]) == \"category\") {<br \/>\n    $catsare=[\"\",\"Not Categorised\",\"Ajax\",\"Android\",\"Animation\",\"Anything You Like\",\"Code::Blocks\",\"Colour Matching\",\"Data Integration\",\"Database\",\"Delphi\",\"Eclipse\",\"eLearning\",\"ESL\",\"Event-Driven Programming\",\"Games\",\"GIMP\",\"GUI\",\"Hradware\",\"Installers\",\"iOS\",\"Land Surveying\",\"Moodle\",\"Music Poll\",\"NetBeans\",\"Networking\",\"News\",\"ontop\",\"OOP\",\"Operating System\",\"Photography\",\"Projects\",\"Signage Poll\",\"Software\",\"SpectroPhotometer\",\"Tiki Wiki\",\"Trips\",\"Tutorials\",\"Uncategorized\",\"Visual Studio\",\"Xcode\"];<br \/>\n    for ($ibh=1; $ibh&lt;sizeof($catsare); $ibh++) {<br \/>\n      if (explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0] == strtolower($catsare[$ibh])) {<br \/>\n        if (strtolower($catsare[$ibh]) == \"ontop\") {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        } else {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        }<br \/>\n      } else if (explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0] == ('' . $ibh)) {<br \/>\n        if (strtolower($catsare[$ibh]) == \"ontop\") {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/?cat=' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        } else {<br \/>\n          header('Location: https:\/\/www.rjmprogramming.com.au\/ITblog\/?cat=' . str_replace(\" \",\"-\",explode(\"&\",strtolower($uparts[-1 + sizeof($uparts)]))[0])) . '#' . $ibh;<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  } <font color=blue>else if (substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 1 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n    if (substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &gt;= '0' && substr(trim($uparts[$ioff - 2 + sizeof($uparts)]) . ' ',0,1) &lt;= '9') {<br \/>\n      $uwidth=trim($uparts[$ioff - 2 + sizeof($uparts)]);<br \/>\n      $uheight=trim(explode('#',explode('?',$uparts[$ioff - 1 + sizeof($uparts)])[0])[0]);<br \/>\n      $imfnameafterdomainsep=\"random_background_fadeinout.jpg\";<br \/>\n      $ptitle=\"Random Background Webpage Fade Tutorial\";<br \/>\n      selectNewBlogPostingTutorialPicture();<br \/>\n      $postingiurl=explode('ITblog' . DIRECTORY_SEPARATOR, dirname(__FILE__) . DIRECTORY_SEPARATOR)[0] . $imfnameafterdomainsep;<br \/>\n      list($iwidth, $iheight, $itype, $iattr) = getimagesize($postingiurl);<br \/>\n      $amime = getimagesize($postingiurl);<br \/>\n      if ($ioff == 0) {<br \/>\n      echo \"&lt;html&gt;\" . $tonl . \"&lt;body\" . $bonl . \"&gt;&lt;pre&gt;data:image\/jpeg;base64,\" . base64_encode(createScaledImage($uwidth,$uheight,$postingiurl,true)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . \"&lt;\/pre&gt;&lt;\/body&gt;&lt;\/html&gt;\";<br \/>\n      } else if (1 == 2) {<br \/>\n      echo '&lt;img src=\"' . \"data:image\/jpeg;base64,\" . base64_encode(file_get_contents($postingiurl)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . '\"&gt;&lt;\/img&gt;';<br \/>\n      } else {<br \/>\n      createScaledImage($uwidth,$uheight,$postingiurl,false); \/\/imagecreatefromjpeg($postingiurl);<br \/>\n      }<br \/>\n      exit;<br \/>\n    }<br \/>\n  }<br \/>\n}<\/font><br \/>\n<br \/>\nget_header(); ?&gt;<br \/>\n<br \/>\n\/\/ more WordPress \"codex\" PHP code follows<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; that amount to changes which enable two types of newly functional URLs that, without the changes, used to result in a WordPress webpage explaining that the URL could not be found &#8230;<\/p>\n<ol>\n<li>a URL such as <a target=_blank title='https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500'>https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500<\/a> will pick a random RJM Programming Blog tutorial picture and show &#8230;<br \/>\n<code><br \/>\n[image data URI of tutorial picture]#[blog posting title]<br \/>\n<\/code><br \/>\n &#8230; along with the happy discovery along the way that the &#8220;#[blog posting title]&#8221; can be tagged onto a base64 data URI and still successfully display the image\n<\/li>\n<li>whereas a URL such as <a target=_blank title='https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500\/' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500\/'>https:\/\/www.rjmprogramming.com.au\/ITblog\/537\/500\/<\/a> will pick a random RJM Programming Blog tutorial picture and show it<\/li>\n<\/ol>\n<p> &#8230; the combination allowing <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html-GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html-GETME\">proof of concept<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.htm\">CSS (styling) &#8220;object-fit&#8221; experimenting web application<\/a> to be now allowing for two sources of image data which the user can select between, themselves, with the RJM Programming WordPress Blog images also containing clickable links back to the WordPress Blog post of relevance.  You can also try this <a title='Iframe usage' href='#myifagd'>here<\/a>.<\/p>\n<p><b><i>Stop Press<\/i><\/b><\/p>\n<p>And then there is some optional filtering of RJM Programming blog image topic, as we make happen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html--GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html--GETME\">proof of concept<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.htm\">CSS (styling) &#8220;object-fit&#8221; experimenting web application<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/image-pair-fitting-into-a-given-dimension-sources-tutorial\/'>Image Pair Fitting into a Given Dimension Sources Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ipfgdpt'>Previous relevant <a target=_blank title='Image Pair Fitting into a Given Dimension Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-pair-fitting-into-a-given-dimension-primer-tutorial\/'>Image Pair Fitting into a Given Dimension Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image Pair Fitting into a Given Dimension Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.jpg\" title=\"Image Pair Fitting into a Given Dimension Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image Pair Fitting into a Given Dimension Primer Tutorial<\/p><\/div>\n<p>One of the most &#8220;catered for&#8221; part of webpage design involves the display of images.  Our recent &#8220;stumbling upon&#8221; &#8230;<\/p>\n<ul>\n<li>the excellent <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos'>Lorem Picsum<\/a> resource for beautiful images suiting a given width x height &#8230; had us looking around for an interesting image related theme to &#8220;tutorialize&#8221; and &#8220;stumbled upon&#8221; &#8230;<\/li>\n<li>the excellent <a target=_blank title='CSS object-fit Property' href='https:\/\/www.w3schools.com\/css\/css3_object-fit.asp'>CSS object-fit Property<\/a> explanation of CSS &#8220;object-fit&#8221; property &#8230;<\/li>\n<\/ul>\n<p> &#8230; facilitating the interest in the scenario &#8230;<\/p>\n<ul>\n<li>you are presented with &#8220;webpage real estate&#8221; of a given width x height &#8230; into which &#8230;<\/li>\n<li>you want to display two images side by side &#8230;<\/li>\n<\/ul>\n<p> &#8230; and in this scenario the use of &#8220;object-fit&#8221; property values &#8230;<\/p>\n<blockquote cite='https:\/\/www.w3schools.com\/css\/css3_object-fit.asp'><p>\nHere is where the object-fit property comes in. The object-fit property can take one of the following values:<br \/>\n<br \/>\nfill &#8211; This is default. The image is resized to fill the given dimension. If necessary, the image will be stretched or squished to fit<br \/>\ncontain &#8211; The image keeps its aspect ratio, but is resized to fit within the given dimension<br \/>\ncover &#8211; The image keeps its aspect ratio and fills the given dimension. The image will be clipped to fit<br \/>\nnone &#8211; The image is not resized<br \/>\nscale-down &#8211; the image is scaled down to the smallest version of none or contain\n<\/p><\/blockquote>\n<p> &#8230; creates interesting variety in how you can configure this scenario depending on your (constraint) interest in &#8230;<\/p>\n<ul>\n<li>you are constrained by fact you must see all the image&#8217;s content in original <a target=_blank title='Aspect ratio information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Aspect_ratio_(image)'>aspect ratio<\/a> &#8230; think &#8230; contain or scale-down<\/li>\n<li>you are constrained by fact you must see all the image&#8217;s content but not necessarily with original aspect ratio &#8230; think &#8230; fill or contain or scale-down<\/li>\n<li>you are constrained by fact that your &#8220;webpage real estate&#8221; of the given width x height must be filled (by image<font size=1>ry<\/font>) &#8230; think &#8230; fill or cover (or <font size=1>(quite often, but not always)<\/font> none)<\/li>\n<li>you must keep original image dimensions but clipping okay &#8230; think &#8230; none<\/li>\n<li>you must keep original aspect ratio of images but clipping okay &#8230; think &#8230; contain or cover or none or scale-down<\/li>\n<\/ul>\n<p> &#8230; and then there is &#8230;<\/p>\n<blockquote><p>\nWhat happens when you resize your webpage window?\n<\/p><\/blockquote>\n<p>Feel free to try our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html_GETME\">proof of concept<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html\">CSS (styling) &#8220;object-fit&#8221; experimenting web application<\/a> &#8230;<\/p>\n<p><iframe id=myifagd src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/images_fitting_a_given_dimension.html\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55687' onclick='var dv=document.getElementById(\"d55687\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/resize\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55687' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55703' onclick='var dv=document.getElementById(\"d55703\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55703' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55796' onclick='var dv=document.getElementById(\"d55796\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/404.php\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55796' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55957' onclick='var dv=document.getElementById(\"d55957\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/date\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55957' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We wanted to nuance the Blog Content filtering functionality of Blog Posting Filtering Background Interfacing Tutorial by &#8230; adding to the existant word within blog posting title filtering prowess &#8230; with &#8230; date (YYYYMMDD) based date filtering of blog posting &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/blog-posting-filtering-background-date-interfacing-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[3849,126,151,181,2370,301,385,3606,431,432,1793,1533,1577,3661,680,932,972,997,1761,1319,1324,1325,1456],"class_list":["post-55957","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-404-php","tag-background","tag-blog","tag-call","tag-contain","tag-date","tag-emoji","tag-emoji-button","tag-filter","tag-filtering","tag-format","tag-get","tag-interface","tag-isset","tag-landing-page","tag-php","tag-posting","tag-programming","tag-prompt","tag-tutorial","tag-twentyten","tag-twentyten-theme","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55957"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=55957"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55957\/revisions"}],"predecessor-version":[{"id":56040,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55957\/revisions\/56040"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}