{"id":56835,"date":"2022-09-14T03:01:36","date_gmt":"2022-09-13T17:01:36","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56835"},"modified":"2022-09-14T09:05:27","modified_gmt":"2022-09-13T23:05:27","slug":"animated-gif-wordpress-background-image-animation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-wordpress-background-image-animation-tutorial\/","title":{"rendered":"Animated GIF WordPress Background Image Animation Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/http_user_agent.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Animated GIF WordPress Background Image Animation Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/back_ag_better.gif\" title=\"Animated GIF WordPress Background Image Animation Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Animated GIF WordPress Background Image Animation Tutorial<\/p><\/div>\n<p>The last time we talked about <i>404.php<\/i> was with the recent <a title='Search Engine Crawler Bot Traffic Detection Tutorial' href='#secbtdt'>Search Engine Crawler Bot Traffic Detection Tutorial<\/a>, but, perhaps we should reiterate, <a target=_blank title='role of 404.php' href='https:\/\/www.sitepoint.com\/how-to-redirect-old-urls-php\/#:~:text=404%20is%20the%20HTTP%20error,the%20page%20for%20real%20content.'>&#8220;what is the usual role of a 404.php file on an Apache\/PHP\/MySql web server<font size=1>?<\/font>&#8220;<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.sitepoint.com\/how-to-redirect-old-urls-php\/#:~:text=404%20is%20the%20HTTP%20error,the%20page%20for%20real%20content.'><p>\n404 is the HTTP error number returned when a resource is unable to be located on the server. The PHP code at the top of the above file returns this code to ensure systems such as search engines don\u2019t mistake the page for real content.\n<\/p><\/blockquote>\n<p>We&#8217;ve been extending its traditional roles here at our RJM Programming WordPress Blog you are reading.  This extension involves background imaging a blog post&#8217;s image (that we&#8217;ve assigned to each blog post) when that blog post is referenced by any of the <i>grouping of blog post lists<\/i> such as &#8230;<\/p>\n<ul>\n<li>via tag<\/li>\n<li>via category<\/li>\n<li>via search string<\/li>\n<li>via month designation<\/li>\n<\/ul>\n<p>We did this, at the end of the line of the logic, via PHP <a target=_blank title='PHP GD' href='https:\/\/www.php.net\/manual\/en\/function.gd-info.php'>GD<\/a> image code &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\nfunction createScaledImage($newWidth,$newHeight,$path,$datauri) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/16774521\/scale-image-using-php-and-maintaining-aspect-ratio<br \/>\n    global $ptitle;<br \/>\n    $image_name=explode(DIRECTORY_SEPARATOR, $path)[-1 + sizeof(explode(DIRECTORY_SEPARATOR, $path))];<br \/>\n<br \/> <br \/>\n    if (!$datauri) {<br \/>\n      if (isset($_GET['random'])) {<br \/>\n       if (substr(($_GET['random'] . ' '),0,1) == '0') {<br \/>\n        $thist=' ' . time();<br \/>\n        $thistminustwo=substr($thist,0,(strlen($thist) - 2));<br \/>\n        if (!file_exists('.\/rjmlist.htm')) {<br \/>\n          file_put_contents('.\/rjmlist.htm', '&lt;body&gt;&lt;pre&gt;' . \"\\n\" . $thist . '|' . $_GET['random'] . '|' . $ptitle . \"\\n&lt;\/pre&gt;&lt;\/body&gt;\");<br \/>\n        } else {<br \/>\n          $sofarc=file_get_contents('.\/rjmlist.htm');<br \/>\n          $newones=explode($thistminustwo, $sofarc);<br \/>\n          $lastiis=0;<br \/>\n          if (strpos($sofarc, ' ') !== false) { $lastiis=explode('|',explode(' ', $sofarc)[1])[0];  }<br \/>\n          if (sizeof($newones) == 1 && (time() - $lastiis) &gt; 100) {<br \/>\n          file_put_contents('.\/rjmlist.htm', '&lt;body&gt;&lt;pre&gt;' . \"\\n\" . $thist . '|' . $_GET['random'] . '|' . $ptitle . \"\\n&lt;\/pre&gt;&lt;\/body&gt;\");<br \/>\n          } else {<br \/>\n          $sofarcs=explode('|' . $_GET['random'] . '|', $sofarc);<br \/>\n          if (sizeof($sofarcs) &gt; 1) {<br \/>\n            $sofarpref=' ' . explode(' ', $sofarcs[0])[-1 + sizeof(explode(' ', $sofarcs[0]))] . '|' . $_GET['random'] . '|' . explode(\"\\n\", $sofarcs[1])[0] . \"\\n\";<br \/>\n            $sofarc=str_replace($sofarpref, \"\", $sofarc);<br \/>\n          }<br \/>\n          file_put_contents('.\/rjmlist.htm', '&lt;body&gt;&lt;pre&gt;' . \"\\n\" . $thist . '|' . $_GET['random'] . '|' . $ptitle . \"\\n\" . str_replace('&lt;body&gt;&lt;pre&gt;' . \"\\n\", '', $sofarc));<br \/>\n          }<br \/>\n        }<br \/>\n       }<br \/>\n      }<br \/>\n    }<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      \/\/echo 'data:image\/gif;base64,' . base64_encode(file_get_contents($path));<\/code><\/p>\n<details id=mydtcode>\n<summary><font color=blue># New code below backgrounds animated GIFs with animation &#8230;<\/font><\/summary>\n<p>\n            <font color=blue>header(&#8216;Content-Type: image\/gif&#8217;);<br \/>\n            echo file_get_contents($path);<br \/>\n      exit;<\/font><\/details>\n<p><code><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 \/>\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; but the trouble was, involving PHP GD with animated GIFs lost those GIF images the chance to be animated <font size=1>&#8230; and we do not want a depressed animated GIF under any circumstances<\/font>?!<\/p>\n<p>So we intervened &#8230; with the &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    if ($mime['mime']=='image\/gif') {<br \/>\n      \/\/echo 'data:image\/gif;base64,' . base64_encode(file_get_contents($path));<\/p>\n<details id=mydtcodetwo open>\n<summary><font color=blue># New code below backgrounds animated GIFs with animation ...<\/font><\/summary>\n<p>\n            <font color=blue>header('Content-Type: image\/gif');<br \/>\n            echo file_get_contents($path);<br \/>\n      exit;<\/font><\/details>\n<p>        $src_img = imagecreatefromgif($path);<br \/>\n    }<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; intervention, as it slots in way above, in our 404.php code, an obvious <i>&#8220;mood lifter&#8221;<\/i>?!<\/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\/animated-gif-wordpress-background-image-animation-tutorial\/'>Animated GIF WordPress Background Image Animation Tutorial<\/a>.<\/p-->\n<hr>\n<p id='secbtdt'>Previous relevant <a target=_blank title='Search Engine Crawler Bot Traffic Detection Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/search-engine-crawler-bot-traffic-detection-tutorial\/'>Search Engine Crawler Bot Traffic Detection 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\/http_user_agent.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Search Engine Crawler Bot Traffic Detection Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/http_user_agent.jpg\" title=\"Search Engine Crawler Bot Traffic Detection Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Search Engine Crawler Bot Traffic Detection Tutorial<\/p><\/div>\n<p>We came across this good precis of <a target=_blank title='what is the aim of a search engine crawling bot' href='https:\/\/www.google.com\/search?client=safari&#038;rls=en&#038;q=what+is+the+aim+of+a+search+engine+crawling+bot&#038;ie=UTF-8&#038;oe=UTF-8'>What is the aim of a search engine crawling bot<\/a>?<\/p>\n<blockquote cite='https:\/\/www.cloudflare.com\/en-au\/learning\/bots\/what-is-a-web-crawler\/'><p>\nA web crawler, spider, or search engine bot downloads and indexes content from all over the Internet. The goal of such a bot is to learn what (almost) every webpage on the web is about, so that the information can be retrieved when it&#8217;s needed. They&#8217;re called &#8220;web crawlers&#8221; because crawling is the technical term for automatically accessing a website and obtaining data via a software program.\n<\/p><\/blockquote>\n<p>As you might imagine, if your website is crawled by a search engine, such as <a target=_blank title='Google' href='https:\/\/google.com'>Google<\/a>, your website may need to cater for short periods of more intense interest.   Perhaps similar for feeds.  Perhaps similar for hacking &#8220;denial of service&#8221; attacks, alas.<\/p>\n<p>Can we identify the first of those sources of traffic?  Well, we did <a target=_blank title='How to detect search engine bots with php? (Google search)' href='https:\/\/www.google.com\/search?q=how+to+detect+search+engine+bots+with+php&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=how+to+detect+search+engine+bots+with+php&#038;aqs=chrome..69i57j69i65.1000j0j7&#038;sourceid=chrome&#038;ie=UTF-8'>some research and development<\/a> and got to <a target=_blank title='Great advice' href='https:\/\/stackoverflow.com\/questions\/677419\/how-to-detect-search-engine-bots-with-php'>this excellent PHP advice<\/a>.<\/p>\n<p>Why, for RJM Programming, do we want to identify the first of those sources of traffic?  Well, we think the recent WordPress Blog TwentyTen theme <a target=_blank title='404.php work' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/404.php'>404.php<\/a> background image work is asking a lot of our web server, and if there is a burst of traffic, we think it might be adversely affecting the website.  Given the aims of a search engine crawling bot, above, we don&#8217;t think denying the bot those background images is a huge problem.   And so, can we change 404.php to lessen that impost on our web server?   We think so, as per &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\nfunction bot_detected() {   \/\/ thanks to https:\/\/stackoverflow.com\/questions\/677419\/how-to-detect-search-engine-bots-with-php<br \/>\n  return (<br \/>\n    isset($_SERVER['HTTP_USER_AGENT'])<br \/>\n    && preg_match('\/bot|crawl|slurp|spider|mediapartners\/i', $_SERVER['HTTP_USER_AGENT'])<br \/>\n  );<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; <font color=blue>used below<\/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 (<font color=blue>!bot_detected() && <\/font>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 . \" style=\\\"background:linear-gradient(rgba(255,255,255,0.7),rgba(255,255,255,0.7)),Url('data:image\/jpeg;base64,\" . base64_encode(createScaledImage($uwidth,$uheight,$postingiurl,true)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . \"') 0px 30px no-repeat;background-size:contain;background-repeat:no-repeat;background-position:0px 30px;\\\"&gt;&lt;pre&gt;data:image\/jpeg;base64,\" . base64_encode(createScaledImage($uwidth,$uheight,$postingiurl,true)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . \"&lt;\/pre&gt;&lt;br&gt;&lt;iframe id=preif style='display:none;width:100%;height:1200px;' src=''&gt;&lt;\/iframe&gt;&lt;br&gt;&lt;img onclick=\\\"document.getElementsByTagName('pre')[0].click();\\\" id=moimg style='display:none;border-width: 28px;border-style: solid; border-image: linear-gradient(to right, lightblue, lightgreen) 1;' src='data:image\/jpeg;base64,\" . base64_encode(createScaledImage($uwidth,$uheight,$postingiurl,true)) . \"#\" . str_replace('+','%20',urlencode($ptitle)) . \"'&gt;&lt;\/img&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<\/code><br \/>\n?&gt; <\/p>\n<p> &#8230; as a means of differentiating users &#8220;surfing the net&#8221; from &#8220;search engine crawling bot&#8221; web traffic to our website&#8217;s WordPress blog (affecting search and tag and category and month list and day list query URLs) you are reading.<\/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='#d56097' onclick='var dv=document.getElementById(\"d56097\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/crawl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56097' 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='#d56835' onclick='var dv=document.getElementById(\"d56835\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/gd\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56835' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The last time we talked about 404.php was with the recent Search Engine Crawler Bot Traffic Detection Tutorial, but, perhaps we should reiterate, &#8220;what is the usual role of a 404.php file on an Apache\/PHP\/MySql web server?&#8220; &#8230; 404 is &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-wordpress-background-image-animation-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":[4,12,14,37],"tags":[3849,83,84,127,151,4077,4076,1550,1996,590,599,932,997,1319,1456],"class_list":["post-56835","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-event-driven-programming","category-tutorials","tag-404-php","tag-animated-gif","tag-animation-2","tag-background-image","tag-blog","tag-error-404","tag-error-code-404","tag-gd","tag-header","tag-image","tag-img","tag-php","tag-programming","tag-tutorial","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56835"}],"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=56835"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56835\/revisions"}],"predecessor-version":[{"id":56845,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56835\/revisions\/56845"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}