{"id":68464,"date":"2025-05-27T03:01:00","date_gmt":"2025-05-26T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=68464"},"modified":"2025-06-27T13:13:57","modified_gmt":"2025-06-27T03:13:57","slug":"denial-of-service-attack-survival-defence-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/denial-of-service-attack-survival-defence-tutorial\/","title":{"rendered":"Denial of Service Attack Survival Defence Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/dos_attack_idea.png\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Denial of Service Attack Survival Defence Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/dos_attack_idea.png\" title=\"Denial of Service Attack Survival Defence Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Denial of Service Attack Survival Defence Tutorial<\/p><\/div>\n<p>When there is a rush for online ticket sales you will often see the symptoms of a <a target=\"_blank\" title='DoS attack information from Wikipedia, thanks' href='https:\/\/en.wikipedia.org\/wiki\/Denial-of-service_attack' rel=\"noopener\"><i>Denial of Service attack<\/i><\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/en.wikipedia.org\/wiki\/Denial-of-service_attack'><p>\nIn computing, a denial-of-service attack (DoS attack) is a cyberattack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to a network. Denial of service is typically accomplished by flooding the targeted machine or resource with superfluous requests in an attempt to overload systems and prevent some or all legitimate requests from being fulfilled.[1] The range of attacks varies widely, spanning from inundating a server with millions of requests to slow its performance, overwhelming a server with a substantial amount of invalid data, to submitting requests with an illegitimate IP address.<\/p><\/blockquote>\n<p> &#8230; of a website.  That is an example of &#8230;<\/p>\n<ul>\n<li>business as usual attack &#8230; but there are also &#8230;<\/li>\n<li>malicious organized attacks<\/li>\n<\/ul>\n<p> &#8230; that can happen too.  We have, quite forlornly, in the past, tried to block access to our website of IP addresses an Apache Status report can <a target=\"_blank\" title='Whois' href='https:\/\/who.is\/' rel=\"noopener\">advise you<\/a> regarding who is sending a flood of suspicious calls.  But these days you get &#8220;banks of such IP addresses&#8221; where the first three numbers are the same and different fourth number IP addresses collude to flood the website targeted &#8230; it is like the <a target=\"_blank\" title='Guacamole game' href='https:\/\/www.google.com\/search?q=guacamole+game&#038;oq=guacamole+game&#038;gs_lcrp=EgZjaHJvbWUyBwgAEAAYgAQyCQgBEEUYORiABDIHCAIQABiABDIHCAMQABiABDIHCAQQABiABDIHCAUQABiABDIHCAYQABiABDIHCAcQABiABDIHCAgQABiABDIHCAkQABiABNIBCjEwMjI3ajBqMTWoAgiwAgHxBXG60DMrsDeR8QVxutAzK7A3kQ&#038;sourceid=chrome&#038;ie=UTF-8' rel=\"noopener\"><strike>guacamole<\/strike><sup> &#8230; and even better <\/sup><\/a> <a target=\"_blank\" title='Whac-a-mole game' href='https:\/\/www.google.com\/search?q=whac+a+mole+game&#038;sca_esv=3ef4cf8506da302d&#038;sxsrf=AE3TifNO6THZfW26NIQna_Ph9QCd8mDDuQ%3A1750993962134&#038;ei=KgxeaOf8B5qp2roP0ZriYQ&#038;ved=0ahUKEwjnuffo0JCOAxWalFYBHVGNOAwQ4dUDCBA&#038;uact=5&#038;oq=whac+a+mole+game&#038;gs_lp=Egxnd3Mtd2l6LXNlcnAiEHdoYWMgYSBtb2xlIGdhbWUyBhAAGAcYHjIGEAAYBxgeMgYQABgHGB4yBhAAGAcYHjIGEAAYBxgeMgYQABgHGB4yBhAAGAcYHjIGEAAYBxgeMgYQABgHGB4yBhAAGAcYHkinBFDpAVjpAXABeAGQAQCYAZ4BoAGeAaoBAzAuMbgBA8gBAPgBAZgCAqACrAHCAgoQABiwAxjWBBhHwgINEAAYgAQYsAMYQxiKBZgDAIgGAZAGCpIHAzEuMaAH9geyBwMwLjG4B6YBwgcDMi0yyAcL&#038;sclient=gws-wiz-serp' rel=\"noopener\">Whac-a-mole game<\/a> trying to contend with the issue this way.   Even so, perhaps later, we will resort to an IP address <i>deny<\/i> approach?!<\/p>\n<p>Okay, so what else can we try?<\/p>\n<p>Maybe you noticed it in amongst the slides of <a title='WordPress Recent Posts Korn Shell Tutorial' href='#wprpkst'>WordPress Recent Posts Korn Shell Tutorial<\/a>&#8216;s animated GIF &#8230; <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA' rel=\"noopener\">anyone, anyone?<\/a><\/p>\n<p>Yes, <a target=\"_blank\" title='?' href='https:\/\/en.wikipedia.org\/wiki\/Alex_McKenna' rel=\"noopener\">Ale<strike style=color:yellow;>c<\/strike>x<\/a>, did you notice anything?<\/p>\n<blockquote><p>\nThe police have kidnapped my children!\n<\/p><\/blockquote>\n<p>Okay, now, we&#8217;ve talked about that before, Ale<strike style=color:yellow;>c<\/strike>x, yes?!  <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA' rel=\"noopener\">Anybody else?<\/a>  Yes, <a target=\"_blank\" title='?' href='https:\/\/en.wiktionary.org\/wiki\/smart_aleck' rel=\"noopener\">Aleck<\/a>, did you see something?<\/p>\n<blockquote><p>\nThe yellow shading up above, quite patently, is designed to be &#8230;<\/p>\n<ol>\n<li>an annotated version of a slide from <a title='WordPress Recent Posts Korn Shell Tutorial' href='#wprpkst'>WordPress Recent Posts Korn Shell Tutorial<\/a>&#8216;s animated GIF<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/recent_again-27.png\" rel=\"noopener\">tarted up<\/a><\/li>\n<li>in some puerile attempt<\/li>\n<li>to make us think jealousy, deceit, cowardice, and even illness are contributing to<\/li>\n<li>the police having kidnapped her children!<\/li>\n<\/ol>\n<\/blockquote>\n<p>Well &#8230; oh, is that the bell?!  We&#8217;ll take this up again tomorrow!  But meanwhile, back at some ranch <font size=1>somewhere<\/font> &#8230; over to you, <i>admin<\/i> &#8230;<\/p>\n<p>We&#8217;re currently trying a Korn Shell script Watchdog (ie. automated) approach that &#8230;<\/p>\n<ol>\n<li>seeks to have the Apache service survive long enough (that being a minute of <i>crontab<\/i> time) &#8230;<\/li>\n<li>during such a DoS attack &#8230; whereby &#8230;<\/li>\n<li>our Korn Shell scripting &#8230; can access &#8230;<\/li>\n<li>Linux system &#8230;<br \/>\n<code><br \/>\nps -ef<br \/>\n<\/code><br \/>\n &#8230; process reporting tool &#8230;<\/li>\n<li>in this way &#8230;<br \/>\n<code><br \/>\nif [ \"`ps -ef | grep 'httpd' | wc -l | wc -c`\" == \"4\" ]; then<br \/>\n \/usr\/local\/cpanel\/scripts\/restartsrv_httpd<br \/>\nfi<br \/>\n<\/code>\n<\/li>\n<li>that restarts the Apache httpd service (no matter what) should 100 or more connections to the website occur when the crontab Korn Shell script (each minute) re-examines the web server situation<\/li>\n<\/ol>\n<p>Sadly, this disrupts what a non-malicious user may be doing when a DoS attack is detected in the way above.  But it means an automated approach can make &#8220;normal transmission&#8221; occur down the line.<\/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\/denial-of-service-attack-survival-defence-tutorial\/' rel=\"noopener\">Denial of Service Attack Survival Defence Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wprpkst'>Previous relevant <a target=\"_blank\" title='WordPress Recent Posts Korn Shell Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-korn-shell-tutorial\/' rel=\"noopener\">WordPress Recent Posts Korn Shell Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_yet_again.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Korn Shell Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_again.gif\" title=\"WordPress Recent Posts Korn Shell Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Korn Shell Tutorial<\/p><\/div>\n<p>Today we&#8217;re rearranging how our <a target=\"_blank\" title='WordPress.org ... your hosting' href='http:\/\/www.wordpress.org' rel=\"noopener\">WordPress<\/a>.org blog Recent Posts widget images are created via <a target=\"_blank\" title='crontab information from computerhope ... thanks' href='http:\/\/www.computerhope.com\/jargon\/c\/cron.htm' rel=\"noopener\">crontab<\/a> and <a target=\"_blank\" title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm' rel=\"noopener\">curl<\/a> in a scheduled way on this newer Apache\/PHP\/MySql Linux web server, as we talked about with <a title='WordPress Recent Posts Navigation Issue Tutorial' href='#wprpnit'>WordPress Recent Posts Navigation Issue Tutorial<\/a> too.<\/p>\n<p>For a reason still unclear to us the recent-posts-2.php <a target=\"_blank\" title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php' rel=\"noopener\">exec<\/a> call of <a target=\"_blank\" title='ImageMagick' href='http:\/\/www.imagemagick.org' rel=\"noopener\">ImageMagick<\/a> convert creation of thumbnails failed, after a failure creating zero length non-thumbnail images (fixed now using PHP <a target=\"_blank\" href='http:\/\/www.w3schools.com\/php\/func_filesystem_copy.asp' title='PHP copy' rel=\"noopener\">copy<\/a> rather than <a target=\"_blank\" title='PHP file_put_contents' href='http:\/\/php.net\/manual\/en\/function.file-put-contents.php' rel=\"noopener\">file_put_contents<\/a>), though it works on the command line in a Linux environment with that same priviledged username.<\/p>\n<p>Especially given that thumbnail usage is optional in the WordPress Recent Posts functionality, rather than spend more time<sup> unhappy<\/sup>, we&#8217;re happy if a beginning to <a target=\"_blank\" title='Korn Shell' href='https:\/\/en.wikipedia.org\/wiki\/KornShell' rel=\"noopener\">Korn Shell<\/a> (which the PHP now writes in a way so that the execution of the Korn Shell causes <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=0TiqXFssKMY' rel=\"noopener\">it&#8217;s self destruction<\/a>) involvement &#8230;<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_yet_again.gif\"><\/img><\/p>\n<p> &#8230; within the crontab purview.<\/p>\n<p>Hopefully we&#8217;ll have good news tomorrow that it worked as a new approach.<\/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\/wordpress-recent-posts-korn-shell-tutorial\/' rel=\"noopener\">New WordPress Recent Posts Korn Shell Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wprpnit'>Previous relevant <a target=\"_blank\" title='WordPress Recent Posts Navigation Issue Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-navigation-issue-tutorial\/' rel=\"noopener\">WordPress Recent Posts Navigation Issue 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\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Navigation Issue Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" title=\"WordPress Recent Posts Navigation Issue Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Navigation Issue Tutorial<\/p><\/div>\n<p>Back to the topic of &#8220;WordPress Blog Recent Posts&#8221; (and its relationship to the RJM Programming Landing Page) last referenced at <a title='WordPress Recent Posts Widget Caching Issues Tutorial' href='#wprpwcit'>WordPress Recent Posts Widget Caching Issues Tutorial<\/a>, is today&#8217;s fix to an iPhone usage hashtag navigational annoyance that would leave the Blog Title lose a bit of its visibility up the top when navigated to via the RJM Programming <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\" title=\"RJM Programming Landing Page\" rel=\"noopener\">Landing Page<\/a> top left &#8220;Recent Posts&#8221; thumbnail images.<\/p>\n<p>The fix saw us add to the existant &#8220;#post-&#8221; prefixed hashtag navigation with our &#8220;#andabit=-70&#8221; &#8220;double hashtagging&#8221; as mentioned in <a target=\"_blank\" href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-hashtag-navigation-return-onmouseover-tutorial\/' title='WordPress Blog Hashtag Navigation Return Onmouseover Tutorial' rel=\"noopener\">WordPress Blog Hashtag Navigation Return Onmouseover Tutorial<\/a>.  It took us a while to track down where to intervene to achieve this, and we eventually cottoned onto the way that if that RJM Programming Landing Page top left &#8220;Recent Posts&#8221; iframe container (ie. <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" title=\"RJM Programming Landing Page zero.html iframe\" rel=\"noopener\"><b>zero.html<\/b><\/a>) of those thumbnail images could involve URLs suffixed by &#8220;#andabit=-70&#8221; we would <font color=blue>rid the hashtag navigation of that annoyance<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    file_put_contents(dirname(__FILE__) . \"\/<b>zero.html<\/b>\",<br \/>\n      <font color=blue>str_replace(\" href='\", ' href=\"',<br \/>\n      str_replace(\"#andabit=-7x' title='\",\"#andabit=-70' title='\",<br \/>\n      str_replace(\"0' title='\",\"0#andabit=-7x' title='\",<br \/>\n      str_replace(\"1' title='\",\"1#andabit=-7x' title='\",<br \/>\n      str_replace(\"2' title='\",\"2#andabit=-7x' title='\",<br \/>\n      str_replace(\"3' title='\",\"3#andabit=-7x' title='\",<br \/>\n      str_replace(\"4' title='\",\"4#andabit=-7x' title='\",<br \/>\n      str_replace(\"5' title='\",\"5#andabit=-7x' title='\",<br \/>\n      str_replace(\"6' title='\",\"6#andabit=-7x' title='\",<br \/>\n      str_replace(\"7' title='\",\"7#andabit=-7x' title='\",<br \/>\n      str_replace(\"8' title='\",\"8#andabit=-7x' title='\",<br \/>\n      str_replace(\"9' title='\",\"9#andabit=-7x' title='\",<\/font>    str_replace(\"\/wordpress\/\", \"\/ITblog\/\", $htmlis))<br \/>\n      <font color=blue>))))))))))))<\/font>;<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; reflected by <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php----------GETME' rel=\"noopener\">a changed<\/a> <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php----------GETME' rel=\"noopener\">recent-posts-2.php<\/a> WordPress &#8220;Recent Posts&#8221; PHP processing codeset.<\/p>\n<p>Then that &#8220;#andabit=-70&#8221; propagates through to a &#8220;double hashtagging&#8221; scenario you can see with today&#8217;s <a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" title=\"Click picture\" rel=\"noopener\">tutorial picture<\/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\/wordpress-recent-posts-navigation-issue-tutorial\/' rel=\"noopener\">WordPress Recent Posts Navigation Issue Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wprpwcit'>Previous relevant <a target=\"_blank\" title='WordPress Recent Posts Widget Caching Issues Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-widget-caching-issues-tutorial\/' rel=\"noopener\">WordPress Recent Posts Widget Caching Issues Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Widget Caching Issues Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/rpzero.gif\" title=\"WordPress Recent Posts Widget Caching Issues Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Widget Caching Issues Tutorial<\/p><\/div>\n<p>The WordPress blog you are reading, with the TwentyTen theme, has a useful &#8220;widget&#8221; (contained unit of functionality on the webpage that WordPress knows about) called &#8220;Recent Posts&#8221;, which we&#8217;ve had a lot of fun over the years, working with, but &#8220;working against&#8221;, a tad <font size=1>(because the issue is <a target=\"_blank\" title='?!' href='https:\/\/www.youtube.com\/watch?v=wlMuBSkVuzE' rel=\"noopener\">not exactly mission critical<\/a>, and)<\/font> if you are not careful, are the combination of &#8230;<\/p>\n<ul>\n<li>the content needed to be up to date at all times would need to counter the once a day crontab\/curl arrangements (that WordPress does not know about) for the new posting each day &#8230; versus &#8230;<\/li>\n<li>the caching of the web browser used can circumvent the up to date correspondence of &#8230;\n<ol>\n<li>&#8220;a&#8221; link nesting &#8230; of &#8230;<\/li>\n<li>&#8220;img&#8221; blog posting thumbnail<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; in two scenarios that we have discovered &#8230;<\/p>\n<ol>\n<li>you arrive back at a blog posting webpage after a crontab\/curl sequence has happened &#8230; the caching causes the &#8220;img&#8221; and &#8220;a&#8221; not to correspond, at least on that first such occasion, sometimes &#8230;<\/li>\n<li>you arrive off the <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\" title=\"Landing Page\" rel=\"noopener\">Landing Page<\/a> (after a crontab\/curl sequence has happened) and up the top left you click on a blog posting that isn&#8217;t the latest, and you visited the day before, the caching from that day before causes the &#8220;img&#8221; and &#8220;a&#8221; not to correspond, at least on that first such occasion, sometimes<\/li>\n<\/ol>\n<p>Today&#8217;s <a target=\"_blank\" title='Tutorial picture' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/rpzero.gif' rel=\"noopener\">animated GIF<\/a> presentation represents a warts and all (occasionally mistaking a Javascript issue for a CSS one) showing of the troubleshooting and investigation of such caching WordPress Recent Posts issues.<\/p>\n<p>Central to the solutions are the idea that the crontab\/curl work leaves behind a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" title=\"Click picture\" rel=\"noopener\">zero.html<\/a> &#8220;report webpage&#8221; we can effectively test the caching against as like a &#8220;sanity test&#8221; &#8230; like.  As &#8220;caching&#8221; is a &#8220;client&#8221; th<strike>a<\/strike>ing whereas the PHP of the TwentyTen theme code &#8220;header.php&#8221; happens is taking place at the &#8220;server&#8221; end of th<strike>a<\/strike>ings, what can be the &#8220;conduit&#8221; between these two woooooorrrrrrllllllldddds &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n&lt;iframe onload='rptds(this);' style='display:none;' src='\/\/www.rjmprogramming.com.au\/PHP\/zero.html&lt;?php echo \"?rand=\" . rand(0,198765432); ?&gt;'&gt;&lt;\/iframe&gt;<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; placed immediately after the &#8220;body&#8221; element definition.  That Javascript &#8220;onload&#8221; event logic sets up some <font color=blue>global arrays<\/font> we&#8217;ll use later &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nvar nothanks=false, findthing=\"\"<font color=blue>, rptdlist=[], rptdhref=[], rptdtitle=[]<\/font>;<br \/>\n<br \/>\nfunction rptds(iois) {<br \/>\n  var thistdis='';<br \/>\n  if (iois != null) {<br \/>\n       var xaaconto = (iois.contentWindow || iois.contentDocument);<br \/>\n       if (xaaconto != null) {<br \/>\n       if (xaaconto.document) { xaaconto = xaaconto.document; }<br \/>\n       if (xaaconto.body != null) {<br \/>\n         var ltds=xaaconto.body.innerHTML.split('&lt;td');<br \/>\n         for (var iltds=1; iltds&lt;ltds.length; iltds++) {<br \/>\n           thistdis='&lt;td' + ltds[iltds].split('&lt;\/td&gt;')[0] + '&lt;\/td&gt;';<br \/>\n           rptdlist.push(thistdis);<br \/>\n           if (thistdis.indexOf(' href=\"') != -1) {<br \/>\n            rptdhref.push(thistdis.split(' href=\"')[1].split('\"')[0]);<br \/>\n           }<br \/>\n           if (thistdis.indexOf(' title=\"') != -1) {<br \/>\n            rptdtitle.push(thistdis.split(' title=\"')[1].split('\"')[0]);<br \/>\n           }<br \/>\n         }<br \/>\n       }<br \/>\n       }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; so that <font color=blue>changed code<\/font> in Javascript &#8220;function rptwo&#8221; as below &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nfunction rptwo() {<br \/>\n  var tworp=document.getElementById('recent-posts-2');<br \/>\n  if (tworp != null) {<br \/>\n    if (tworp.innerHTML.indexOf('&lt;u' + 'l&gt;') != -1) {<br \/>\n      var ihs=tworp.innerHTML.split(\"&lt;\/a&gt;\");<br \/>\n      tworp.innerHTML = tworp.innerHTML.replace('&lt;u' + 'l&gt;', '&lt;u' + 'l class=\"iconlist\"&gt;').replace(\/a href\/g,'a style=\"border:1px solid rgba(0,127,0,0.6);background: rgba(0,255,0,0.6); background: -webkit-linear-gradient(left top, rgba(0,255,0,0.6), rgba(255,255,0,0.6)); background: -o-linear-gradient(bottom right, rgba(0,255,0,0.5), rgba(255,255,0,0.6)); background: -moz-linear-gradient(bottom right, rgba(0,255,0,0.6), rgba(255,255,0,0.6)); background: linear-gradient(to bottom right, rgba(0,255,0,0.6), rgba(255,255,0,0.6));\" title=\"Go to tutorial\" onclick=\"if (1 == 2) { findthing=' + \"''\" + '; } nothanks=true;\" href');<br \/>\n      var eight=new Array(\"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\");<br \/>\n      var ieight;<br \/>\n      tworp.innerHTML = tworp.innerHTML.replace(\/&lt;\\\/a&gt;\/g, \"&lt;\/a&gt;&lt;img class='iiconlist' src='\/\/www.rjmprogramming.com.au\/wordpress\/transparent.png' style='z-index:3;margin-left:0px;margin-top:0px;opacity:0.2;width:140px;height:100px;box-shadow:rgba(0,0,255,0.2) 2px 2px 2px 2px inset;' onmouseover='getRpnow();' onmouseout='yehBut();' ontouchstart='getRpnow();' ontouchend='yehBut();' title=' ... welcome to the long hover functionality that shows Blog Post regarding Recent Post images'&gt;\");<br \/>\n      for (ieight=0; ieight&lt;eight.length; ieight++) {<br \/>\n        if (ihs.length &gt; eval(0 + ieight)) {<br \/>\n        <font color=blue>if (rptdtitle.length &gt; ieight) {<br \/>\n        if (ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] != rptdtitle[ieight]) {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(ihs[eval(0 + ieight)], ihs[eval(0 + ieight)].replace(' href=', ' href=\"' + rptdhref[ieight].replace('?p=', '?rx=' + Math.floor(Math.random() * 198765434) + '&p=') + '\" data-href=').replace('&gt;' + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + '&lt;', '&gt;' + rptdtitle[ieight] + '&lt;'));<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + rptdtitle[ieight] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        } else {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        }<br \/>\n        } else {<\/font><br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        <font color=blue>}<\/font><br \/>\n        } else {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        }<br \/>\n        \/\/tworp.innerHTML = tworp.innerHTML.replace(\"&lt;img class=\", \"&lt;img onclick='clickaid(\\\"a\" + eight[ieight] + \"\\\");' class=\").replace(\"&lt;img title=\\\" \", \"&lt;img onclick=\\\"clickaid('a\" + eight[ieight] + \"');\\\" title=\\\"\");<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;img class=\", \"&lt;img onclick=\\\"if (1 == 2) { findthing=''; } nothanks=true; clickaid('a\" + eight[ieight] + \"');\\\" class=\").replace(\"&lt;img title=\\\" \", \"&lt;img onclick=\\\"clickaid('a\" + eight[ieight] + \"');\\\" title=\\\"\");<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; helps resolve the second issue&#8217;s mismatched data sources which caching may exacerbate.<\/p>\n<p>What about the first issue?  Well, we went down the route of thinking this was bound to be a Javascript scripting issue and went through the code with that in mind, until searching for &#8220;one.jp&#8221; <font size=1>(I think it was)<\/font> within &#8220;header.php&#8221; got us tweaked into realizing some of the CSS styling there was encouraging the cache to not let go of &#8220;img&#8221; &#8220;src&#8221; attributes.  As we are more and more fond of doing these days, even for image URLs, we add some &#8220;get&#8221; &#8220;?&#8221; and\/or &#8220;&#038;&#8221; arguments to cause the web browser to go back to the source (and so, around the &#8220;cache&#8221;) to get its data, as per &#8220;header.php&#8221;&#8216;s <font color=blue>(changed)<\/font> &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\nli.one {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/one.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.two {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/two.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.three {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/three.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.four {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/four.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.five {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/five.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.six {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/six.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.seven {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/seven.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.eight {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/eight.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p>Continuing in that long line of WordPress <a href='#recent-posts-2' title='Recent Posts widget here'>Recent Posts<\/a> work you look over to your right (or down the bottom, for some mobile platforms) of the blog webpage for the relevant widget that has that relationship to the Landing Page as we last talked about with <a title='Landing Page WordPress Tags Primer Tutorial' href='#lpwptpt'>Landing Page WordPress Tags Primer Tutorial<\/a>.  There, you can see, we hope, more reliable correspondence of &#8220;a&#8221; to &#8220;img&#8221; data sources, in their rightful order, the catalyst for change being that once a day crontab\/curl &#8220;inhouse&#8221; publishing of one WordPress blog post.<\/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\/wordpress-recent-posts-widget-caching-issues-tutorial\/' rel=\"noopener\">WordPress Recent Posts Widget Caching Issues Tutorial<\/a>.<\/p-->\n<hr>\n<p id='lpwptpt'>Previous relevant <a target=\"_blank\" title='Landing Page WordPress Tags Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-wordpress-tags-primer-tutorial\/' rel=\"noopener\">Landing Page WordPress Tags 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\/index.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Landing Page WordPress Tags Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lpwptags.jpg\" title=\"Landing Page WordPress Tags Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Landing Page WordPress Tags Primer Tutorial<\/p><\/div>\n<p>We&#8217;re hooking into our crontab\/curl PHP overnight arrangements regarding Recent Posts to add in &#8230;<\/p>\n<ul>\n<li>a once a day creation of a web server &#8220;tag cloud&#8221; HTML file &#8230; derived via &#8230;<\/li>\n<li>WordPress blog widget &#8220;Tags&#8221; content<\/li>\n<\/ul>\n<p> &#8230; that creates on the RJM Programming &#8220;Landing Page&#8221; a toggling arrangement between &#8230;<\/p>\n<ul>\n<li>this new &#8220;tag cloud&#8221; content in an iframe &#8220;onload&#8221; event populating of a global var<font size=1>iable<\/font> divtc &#8230; within the Landing Page Javascript &#8230;<br \/>\n<code><br \/>\n  var divtc='';<br \/>\n<br \/>\nfunction anticheckd(iois) {<br \/>\n  document.getElementById('divtagcloud').innerHTML='';<br \/>\n}<br \/>\n<br \/>\nfunction checkd(iois) {<br \/>\n  if (iois != null) {<br \/>\n    var aconto = (iois.contentWindow || iois.contentDocument);<br \/>\n    if (aconto != null) {<br \/>\n     if (aconto.document) { aconto = aconto.document; }<br \/>\n     if (aconto.body != null) {<br \/>\n        divtc=aconto.body.innerHTML;<br \/>\n        if (divtc.indexOf(' class=\"tagcloud\"') != -1) {<br \/>\n          setTimeout(divtctoggler, 8000);<br \/>\n        } else {<br \/>\n          document.getElementById('divtagcloud').innerHTML='';<br \/>\n        }<br \/>\n     }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction divtctoggler() {<br \/>\n  if (divtc != '') {<br \/>\n   if (document.getElementById('divtagcloud').innerHTML == '' || document.getElementById('divtagcloud').innerHTML.indexOf('&lt;iframe ') != -1) {<br \/>\n     document.getElementById('topi').style.display='none';<br \/>\n     document.getElementById('divtagcloud').style.transformOrigin=\"30% 10%\"; \/\/zoom=\"0.75\";<br \/>\n     document.getElementById('divtagcloud').style.transform=\"scale(0.5)\"; \/\/zoom=\"0.75\";<br \/>\n     document.getElementById('divtagcloud').innerHTML=divtc;<br \/>\n   } else {<br \/>\n     document.getElementById('divtagcloud').innerHTML='';<br \/>\n     document.getElementById('topi').style.display='block';<br \/>\n   }<br \/>\n   setTimeout(divtctoggler, 15000);<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; supporting the new HTML &#8230;<br \/>\n<code><br \/>\n&lt;div id=divtagcloud&gt;&lt;iframe style='display:none;' onerror='anticheckd(this);' onload='checkd(this);' src='\/\/www.rjmprogramming.com.au\/PHP\/divtagcloud.html'&gt;&lt;\/iframe&gt;&lt;\/div&gt;<br \/>\n<\/code><br \/>\n &#8230; with &#8230;<\/li>\n<li>existing Google Chart Pie Chart example of use<\/li>\n<\/ul>\n<p> &#8230; in its &#8220;div widget&#8221; within the Landing Page HTML.  As far as the crontab\/curl PHP goes <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php--------GETME' rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php--------GETME' rel=\"noopener\">recent-posts-2.php<\/a> does its job of populating &#8230;<\/p>\n<p><iframe style='width:100%;height:200px;' src='http:\/\/www.rjmprogramming.com.au\/PHP\/divtagcloud.html'><\/iframe><\/p>\n<p> &#8230; via &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n   $classtagcloud=file_get_contents(\"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=14234\");<br \/>\n   $classtags=explode('&lt;div class=\"tagcloud\"', str_replace(\"http:\",\"\",str_replace(\"https:\",\"\",$classtagcloud)));<br \/>\n   if (sizeof($classtags) &gt; 1) {<br \/>\n     file_put_contents(dirname(__FILE__) . '\/divtagcloud.html', str_replace('&lt;a ','&lt;a target=_blank ','&lt;html&gt;&lt;body&gt;&lt;div class=\"tagcloud\"' . explode('&lt;\/div&gt;', $classtags[1])[0] . '&lt;\/div&gt;&lt;\/body&gt;&lt;\/html&gt;'));<br \/>\n   }<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\/landing-page-wordpress-tags-primer-tutorial\/' rel=\"noopener\">Landing Page WordPress Tags Primer Tutorial<\/a>.<\/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='#d50515' onclick='var dv=document.getElementById(\"d50515\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/landing-page\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d50515' 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='#d51251' onclick='var dv=document.getElementById(\"d51251\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/cache\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d51251' 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='#d55433' onclick='var dv=document.getElementById(\"d55433\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/landing-page\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55433' 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='#d68419' onclick='var dv=document.getElementById(\"d68419\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/thumbnail\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68419' 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='#d68464' onclick='var dv=document.getElementById(\"d68464\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/service\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68464' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When there is a rush for online ticket sales you will often see the symptoms of a Denial of Service attack &#8230; In computing, a denial-of-service attack (DoS attack) is a cyberattack in which the perpetrator seeks to make a &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/denial-of-service-attack-survival-defence-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,29,37],"tags":[85,5202,249,252,274,5200,5199,358,5201,5203,629,677,707,885,3300,1054,2260,1114,2031,1193,1319,1397,5204],"class_list":["post-68464","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-apache","tag-apache-httpd","tag-configuration","tag-connection","tag-crontab","tag-denial-of-service","tag-denial-of-service-attack","tag-dos","tag-flood","tag-httpd-service","tag-ip-address","tag-korn-shell","tag-linux","tag-operating-system-2","tag-ps","tag-report","tag-restart","tag-security","tag-service","tag-start","tag-tutorial","tag-watchdog","tag-wc"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68464"}],"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=68464"}],"version-history":[{"count":14,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68464\/revisions"}],"predecessor-version":[{"id":68822,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68464\/revisions\/68822"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=68464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=68464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=68464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}