{"id":58287,"date":"2023-02-09T03:01:15","date_gmt":"2023-02-08T17:01:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58287"},"modified":"2023-02-08T20:14:40","modified_gmt":"2023-02-08T10:14:40","slug":"perl-cgi-intranet-audio-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-intranet-audio-tutorial\/","title":{"rendered":"Perl CGI Intranet Audio Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI Intranet Audio Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_audio.jpg\" title=\"Perl CGI Intranet Audio Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI Intranet Audio Tutorial<\/p><\/div>\n<p>We&#8217;ve got a couple of changes onto yesterday&#8217;s <a title='Perl CGI URL Content Tutorial' href='#pcgiurlct'>Perl CGI URL Content Tutorial<\/a>&#8216;s progress regarding our Perl CGI Modules explorations &#8230;<\/p>\n<ul>\n<li>base the navigation to Perl as HTML <font color=blue>form method=POST<\/font> rather than method=GET &#8230; allowing for larger data sets &#8230; and &#8230;<\/li>\n<li>if you can &#8230;\n<ol>\n<li>be on macOS<\/li>\n<li>be on an actively started MAMP local Apache\/PHP\/MySql web server that uses port 8888 for the HTTP: protocol parts of the access<\/li>\n<li>have downloaded the necessary inhouse code (primarily macos_say_record.php)<\/li>\n<\/ol>\n<p> &#8230; we can offer you text to audio via an <font color=purple>Intranet arrangement accessing the macOS say command<\/font> line command<\/li>\n<\/ul>\n<p> &#8230; within the Perl Code &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\nuse DBI;<br \/>\nuse DBD::mysql;<br \/>\nuse Spreadsheet::WriteExcel;<br \/>\nuse Data::Dumper qw(Dumper);<br \/>\nuse LWP::UserAgent ();<br \/>\n#use PDF::Create;<br \/>\nuse utf8;<br \/>\n#use Unicode::Escape;<br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n} <font color=blue>elsif ($ENV{'REQUEST_METHOD'} eq \"POST\") {<br \/>\n   read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});<br \/>\n}<\/font><br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\nmy $rest = \"\";<br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n$inurl = $FORM{inurl};<br \/>\nmy $before_page = \"\";<br \/>\nmy $allbutlastbit = \"\";<br \/>\nmy $lastbit = (split '\/', $ENV{REQUEST_URI})[-1];<br \/>\nmy $page_url = 'http';<br \/>\n$page_url.='s' if $ENV{HTTPS};<br \/>\n$page_url.=':\/\/';<br \/>\nif ($ENV{SERVER_PORT} != 80) {<br \/>\n    $before_page=\"$ENV{SERVER_NAME}:$ENV{SERVER_PORT}\/\";<br \/>\n    $page_url.=\"$ENV{SERVER_NAME}:$ENV{SERVER_PORT}$ENV{REQUEST_URI}\";<br \/>\n} else {<br \/>\n    $before_page=\"$ENV{SERVER_NAME}\/\";<br \/>\n    $page_url.=\"$ENV{SERVER_NAME}.$ENV{REQUEST_URI}\";<br \/>\n}<br \/>\nif (length($lastbit) &gt; 0) {<br \/>\n    $allbutlastbit = substr($page_url, 0, (length($page_url) - length($lastbit)));<br \/>\n} else {<br \/>\n    $allbutlastbit = $page_url;<br \/>\n}<br \/>\n<br \/>\nif (length($inurl) == 0) {<br \/>\n $inurl = $inurl;<br \/>\n} else {<br \/>\n $inurl =~ s\/%3A\/:\/ig;<br \/>\n $inurl =~ s\/%2F\/\\\/\/ig;<br \/>\n $inurl =~ s\/%3F\/?\/ig;<br \/>\n $inurl =~ s\/%26\/&\/ig;<br \/>\n my $ipage_url = $inurl;<br \/>\n my $ibefore_page = \"\";<br \/>\n my $iallbutlastbit = \"\";<br \/>\n my $ilastbit = (split '\/', $inurl)[-1];<br \/>\n my $lenseven = (7 + length($ilastbit));<br \/>\n my $leneight = (8 + length($ilastbit));<br \/>\n my $leni = length($inurl);<br \/>\n if (length($ilastbit) &gt; 0) {<br \/>\n    if ($lenseven == $leni) {<br \/>\n    $iallbutlastbit = \"${inurl}\/\";<br \/>\n    } elsif ($leneight == $leni) {<br \/>\n    $iallbutlastbit = \"${inurl}\/\";<br \/>\n    } else {<br \/>\n    $iallbutlastbit = substr($ipage_url, 0, (length($ipage_url) - length($ilastbit)));<br \/>\n    }<br \/>\n } else {<br \/>\n    $iallbutlastbit = $ipage_url;<br \/>\n }<br \/>\n<br \/>\n my $ua = LWP::UserAgent-&gt;new(timeout =&gt; 10);<br \/>\n $ua-&gt;env_proxy;<br \/>\n<br \/>\n my $response = $ua-&gt;get($inurl);<br \/>\n<br \/>\n if ($response-&gt;is_success) {<br \/>\n    my $dcont = $response-&gt;decoded_content;<br \/>\n    #$dcont =~ s\/html\\&gt;\/div\\&gt;\/ig;<br \/>\n    #$dcont =~ s\/body\\&gt;\/div\\&gt;\/ig;<br \/>\n    $dcont =~ s\/\"\\\/\\\/\/&amp;#34;\\\/\\\/\/ig;<br \/>\n    $dcont =~ s\/\"http\/&amp;#34;http\/ig;<br \/>\n    $dcont =~ s\/\"file\/&amp;#34;file\/ig;<br \/>\n    $dotdot = \"..\\\/\";<br \/>\n    if (index($dcont, \"rjmprogramming.com.au\") &gt;= 0) {<br \/>\n      $allbutlastbit =~ s\/:443\/\/ig;<br \/>\n      $allbutlastbit =~ s\/\\\/cgi-bin\\\/\/\\\/\/ig;<br \/>\n      if (substr($allbutlastbit, -1, 1) == \"\/\") {<br \/>\n        $allbutlastbit = substr($allbutlastbit, 0, (-1 + length($allbutlastbit)));<br \/>\n      }<br \/>\n      $dcont =~ s\/\"\\\/\/&amp;#34;${allbutlastbit}\\\/\/ig;<br \/>\n      #$dcont =~ s\/ src=\"\/ src=\"..\\\/\/ig;<br \/>\n      #$dcont =~ s\/ href=\"\/ href=\"..\\\/\/ig;<br \/>\n      $dcont =~ s\/ src=\"\/ src=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ action=\"\/ action=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ srcset=\"\/ srcset=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ href=\"\/ href=\"${dotdot}\/ig;<br \/>\n    } else {<br \/>\n      if (index($dcont, \"wikipedia.org\") &gt;= 0) {<br \/>\n      $dotdot =~ s\/\\\/wiki\\\/\/\\\/\/ig;<br \/>\n      ${iallbutlastbit} =~ s\/\\\/wiki\\\/\/\\\/\/ig;<br \/>\n      } else {<br \/>\n      $dotdot = $iallbutlastbit;<br \/>\n      }<br \/>\n      if (substr($iallbutlastbit, -1, 1) == \"\/\") {<br \/>\n        $iallbutlastbit = substr($iallbutlastbit, 0, (-1 + length($iallbutlastbit)));<br \/>\n      }<br \/>\n      $dcont =~ s\/\"\\\/\/&amp;#34;${iallbutlastbit}\\\/\/ig;<br \/>\n      $dcont =~ s\/ src=\"\/ src=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ srcset=\"\/ srcset=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ action=\"\/ action=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ href=\"\/ href=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/url\\(\"\/url\\(\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/url\\(portal\\\/\/url\\(${dotdot}portal\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(static\\\/\/url\\(${dotdot}static\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(wiki\\\/\/url\\(${dotdot}wiki\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(er\\\/\/url\\(${dotdot}er\\\/\/ig;<br \/>\n    }<br \/>\n    $dcont =~ s\/\"\/&amp;#34;\/ig;<br \/>\n    $dcont =~ s\/\\r\\n\/\/ig;<br \/>\n    $dcont =~ s\/\\n\/\/ig;<br \/>\n    $dcont =~ s\/\\r\/\/ig;<br \/>\n    # print \"Content-type: text\/html\\n\\n\";<br \/>\n    $rest .= \"&lt;br&gt;&lt;details id=drest&gt;&lt;summary&gt;&lt;h3&gt;&lt;a target=_blank href=$inurl&gt;$inurl&lt;\/a&gt;&lt;\/h3&gt;&lt;\/summary&gt;&lt;br&gt;&lt;iframe style=width:100%;height:900px; srcdoc=\\\"\" . $dcont . \"\\\"&gt;&lt;\/iframe&gt;&lt;\/details&gt;&lt;br&gt;\";<br \/>\n }<br \/>\n #else {<br \/>\n #    die $response-&gt;status_line;<br \/>\n #}<br \/>\n}<br \/>\n$blogp  = $FORM{blogp};<br \/>\n$blogp =~ s\/%2C\/,\/ig;<br \/>\n$blogi = $blogp;<br \/>\nmy $blogt  = $FORM{blogt};<br \/>\n$blogt =~ s\/%2C\/,\/ig;<br \/>\n$oneletter = substr( $first_name, 0, 1 );<br \/>\n<br \/>\n#my $uemoji  = Unicode::Escape-&gt;new($FORM{emoji});<br \/>\nmy $emoji = chr(0x0001F517); # \"\\xf0\\x9f\\x98\\x80\"; #$uemoji-&gt;unescape;<br \/>\n#my $ucutei  = Unicode::Escape-&gt;new($FORM{cutei});<br \/>\nmy $cutei = chr(0x0001F3C3); # \"\\xf0\\x9f\\x98\\x80\"; #$ucutei-&gt;unescape;<br \/>\n#my $uimgei  = Unicode::Escape-&gt;new($FORM{imgei});<br \/>\nmy $imgei = chr(0x0001F5BC); # \"\\xf0\\x9f\\x98\\x80\"; #$uimgei-&gt;unescape;<br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n<br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n<br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n<br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n<br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n<br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n<br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n<br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n<br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\n$tt = \"\";<br \/>\n$cont = \"\";<br \/>\n$oneletter = \" \";<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" var ls='', ns='', qwr='', wo=null, hears=[], vsexthears=[], exthears=[], jd=0, yes=false, lhear=''; \";<br \/>\nprint \" function zeroize(iinsf) { var insf=iinsf; var sep='\/', i=0; while (insf.substring(i).substring(0,1) &gt;= '0' && insf.substring(i).substring(0,1) &lt;= '9') { i++; } sep=insf.substring(i).substring(0,1); \";<br \/>\nprint \"   var arr=insf.split(sep); \";<br \/>\nprint \"   if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"    if (eval('' + arr[1].length) == 1) { insf=insf.replace(sep + arr[1] + sep, sep + '0' + arr[1] + sep);  } \";<br \/>\nprint \"    if (eval('' + arr[0].length) == 1) { insf='0' + insf;  } \";<br \/>\nprint \"    arr=insf.split(' ')[1].split(':'); \";<br \/>\nprint \"    if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"      if (insf.indexOf(' pm') != -1) { insf=insf.replace(' ' + arr[0].trim() + ':', ' ' + eval(12 + eval('' + arr[0].trim())) + ':').replace(' pm', ' ');  arr=insf.split(' ')[1].split(':');   } \";<br \/>\nprint \"      if (eval(-1 + eval('' + arr[1])) == eval('' + document.getElementById('mystime').innerHTML.split(':')[1])) {  insf=insf.replace(':' + arr[1] + ':', ':' + document.getElementById('mystime').innerHTML.split(':')[1] + ':');  arr[1]='zz';   } \";<br \/>\nprint \"      if (eval('' + arr[1].length) == 1) { insf=insf.replace(':' + arr[1] + ':', ':0' + arr[1] + ':');  } \";<br \/>\nprint \"      if (eval('' + arr[0].trim().length) == 1) { insf=insf.replace(arr[0].trim() + ':', '0' + arr[0].trim() + ':');  } \";<br \/>\nprint \"    } \";<br \/>\nprint \"   } \";<br \/>\nprint \"   return insf; \";<br \/>\nprint \" } \";<br \/>\nprint \" function loctime() { if (ls == '') { hearall(); \";<br \/>\nprint \"   qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   ls=zeroize(('' + d.toLocaleString()).replace(',','')) + ' &lt;a onclick=alert(qwr); style=cursor:pointer;text-decoration:underline;&gt;GMT' + d.toString().split(' GMT')[1] + '&lt;\/a&gt;'; } if (!document.getElementById('mytime')) { setTimeout(loctime,1000); } else { \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); } \";<br \/>\n#print \"   window.open('HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20Hello%20$first_name%20$last_name','_blank','top=150,left=50,width=50,height=50'); \";<br \/>\nprint \" } \";<br \/>\n<font color=purple>print \" function ihit(proposed) { \";<br \/>\nprint \"   var beg=proposed.split('&lt;')[0].split('[')[0]; var begs=proposed.split('&gt;'); for (var jj=1; jj&lt;begs.length; jj++) { beg+=' ' + begs[jj].split('&lt;')[0].split('[')[0]; } \";<br \/>\nprint \"   return beg; } \";<br \/>\nprint \" function closeit() { if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  } if (yes && hears.length &gt; 0) { hear(hears[0]); hears.shift();  } return '';  } setTimeout(closeit, 15000); \";<br \/>\nprint \" } \";<br \/>\nprint \" function exthear(xwhat) { lhear=''; var what=xwhat; for (var iijj=0; iijj&lt;vsexthears.length; iijj++) { if (1 == 2 && xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) == -1) {   alert(xwhat + ' does not contain ' + vsexthears[iijj].toLowerCase().trim());   } else if (xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) != -1) { what=exthears[iijj]; while (what.indexOf(String.fromCharCode(10)) != -1) { what=what.replace(String.fromCharCode(10),' '); } while (what.indexOf(String.fromCharCode(39)) != -1) { what=what.replace(String.fromCharCode(39),' '); } while (what.indexOf(String.fromCharCode(34)) != -1) { what=what.replace(String.fromCharCode(34),' '); } while (what.indexOf('   ') != -1) { what=what.replace('   ',' '); }  while (what.indexOf('  ') != -1) { what=what.replace('  ',' '); } }    } lhear='';  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what).substring(0,600),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 65000);  \";<br \/>\nprint \" } \";<br \/>\nprint \" function lhears() { what=lhear;   if (what == '') { return ''; } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); \";<br \/>\nprint \" } \";<br \/>\nprint \" function hear(what) { if (lhear == '') { lhear=what; setTimeout(lhears, 4000);  } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); \";<br \/>\nprint \" } \";<br \/>\nprint \" function hearall() { var dasis=document.getElementsByTagName('div'); var asis=document.getElementsByTagName('button'); var thisjd=0; jd=0; while (thisjd &lt; dasis.length && ('' + dasis[thisjd].className) != 'divcont') { thisjd++;    } jd=thisjd; for (var ii=0; ii&lt;asis.length; ii++) { if (('' + asis[ii].className) == 'hear') {    vsexthears.push((asis[ii].getAttribute('data-alt')));   exthears.push(ihit(asis[ii].getAttribute('data-alt') + ' ' + dasis[jd].innerHTML)); hears.push(asis[ii].getAttribute('data-alt')); thisjd++; while (thisjd &lt; dasis.length && ('' + dasis[thisjd].className) != 'divcont') { thisjd++;    } jd=thisjd;   }  } \";<br \/>\nprint \" } \";<\/font><br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=setTimeout(loctime,1000);&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;<font color=purple>&lt;span id=myspan&gt;&lt;a ondblclick='yes=true; setTimeout(hearall,1000);' id=mya title='MacOS MAMP HTTP:\/\/localhost:8888\/macos_say_record.php text to audio ... download instructions, as relevant, can be determined via a read of https:\/\/www.rjmprogramming.com.au\/ITblog\/mamp-timekeeping-web-application-visibility-tutorial\/ ... double click for all Tutorial Title audios, also, sequenced' style=cursor:pointer;background-color:lightgreen; onclick=\\\" if (wo) { return '';  }  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20Hello%20$first_name%20$last_name','_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000);  \\\"&gt;<\/font>Hello $first_name $last_name<font color=purple>&lt;\/a&gt;&lt;\/span&gt;<\/font>&lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;&lt;h4&gt;\";<br \/>\n<br \/>\nif ($blogp == \"\") {<br \/>\n $blogp = $first_name;<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n}<br \/>\n<br \/>\nif ($blogp != \"\") {<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n<br \/>\n if ((ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) || ord($oneletter) == 40 ){<br \/>\n  my ($oneurl) = split \/,\/, $blogp;<br \/>\n<br \/>\n  if ($oneurl == $blogp) {<br \/>\n   $oneletter = substr( $blogp, 0, 1 );<br \/>\n  } else {<br \/>\n   if (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) {<br \/>\n     $oneletter = \"1\";<br \/>\n     $blogp = \"( $blogp )\";<br \/>\n   } else {<br \/>\n     $oneletter = \"2\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n }<br \/>\n}<br \/>\n<br \/>\nif (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")){<br \/>\n # \/*** mysql hostname ***\/<br \/>\n $hostname = 'dbhost';<br \/>\n<br \/>\n # \/*** mysql username ***\/<br \/>\n $username = 'username';<br \/>\n<br \/>\n # \/*** mysql ***\/<br \/>\n $password = 'password';<br \/>\n<br \/>\n $dbname = 'dbname';<br \/>\n<br \/>\n $tname = 'table_name';<br \/>\n $hostname = \"DBI:mysql:$dbname:$hostname\";<br \/>\n<br \/>\n $dbh = DBI-&gt;connect($hostname, $username, $password);<br \/>\n<br \/>\n my ($oneaurl) = split \/,\/, $blogp;<br \/>\n if (index($blogp, ',') &lt;= 0) {<br \/>\n   $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID=?\");<br \/>\n } else {<br \/>\n   if (ord($oneletter) != 40) {<br \/>\n     $blogp = \"($blogp)\";<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   } else {<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n if ($blogp == \"\") {<br \/>\n  $sth-&gt;execute();<br \/>\n } else {<br \/>\n  $sth-&gt;execute( $blogp );<br \/>\n }<br \/>\n<br \/>\n $one = 0;<br \/>\n $two = 10;<br \/>\n $exc = 0;<br \/>\n $coln = \"A\";<br \/>\n $dcol = 1;<br \/>\n $rown = 6;<br \/>\n $trown = 6;<br \/>\n $alinkis = \"\";<br \/>\n my $pdf = 0;<br \/>\n my $workbook = 0; # Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<br \/>\n my $date_format = 0;<br \/>\n my $date = 0;<br \/>\n<br \/>\n # Set the default format for dates.<br \/>\n<br \/>\n while (($tt, $cont, $iid) = $sth-&gt;fetchrow_array()) {<br \/>\n  my ($idis) = split \/,\/, $blogi, 1;<br \/>\n  my ($yyyymmdd) =  substr( $blogt, $one, $two ); # split \/,\/, $blogt, 1;<br \/>\n  my ($junk, $imageu) = split \/ src=\"\/, $cont;<br \/>\n  my ($imageurl) = split \/\"\/, $imageu;<br \/>\n  my ($junk, $cutto) = split \/ href=\"\/, $cont;<br \/>\n  my ($cuttothechase) = split \/\"\/, $cutto;<br \/>\n  $blogt = substr( $blogt, 11 );<br \/>\n  if ($exc == 0) {<br \/>\n    $exc = 1;<br \/>\n<br \/>\n    #my $pdf = PDF::Create-&gt;new(<br \/>\n    # 'filename'     =&gt; '..\/perl.pdf',<br \/>\n    # 'Author'       =&gt; \"$first_name $last_name\",<br \/>\n    # 'Title'        =&gt; 'Sample PDF',<br \/>\n    # 'CreationDate' =&gt; [ localtime ]<br \/>\n    #);<br \/>\n<br \/>\n    # Add a A4 sized page<br \/>\n    #my $root = $pdf-&gt;new_page('MediaBox' =&gt; $pdf-&gt;get_page_size('A4'));<br \/>\n<br \/>\n    # Add a page which inherits its attributes from $root<br \/>\n    #my $page1 = $root-&gt;new_page;<br \/>\n<br \/>\n    # Prepare a font<br \/>\n    #my $font = $pdf-&gt;font('BaseFont' =&gt; 'Helvetica');<br \/>\n<br \/>\n    # Prepare a Table of Content<br \/>\n    #my $toc = $pdf-&gt;new_outline('Title' =&gt; 'Title Page', 'Destination' =&gt; $page1);<br \/>\n<br \/>\n    # Create a new Excel workbook<br \/>\n    $workbook = Spreadsheet::WriteExcel-&gt;new('..\/perl.xlsm');<br \/>\n<br \/>\n    # Add a worksheet<br \/>\n    $worksheet = $workbook-&gt;add_worksheet();<br \/>\n    $worksheet-&gt;set_column(0, 0,  90);<br \/>\n    $worksheet-&gt;set_column(1, 0,  30);<br \/>\n<br \/>\n    #  Add and define a format<br \/>\n    $format = $workbook-&gt;add_format(); # Add a format<br \/>\n    $format-&gt;set_bold();<br \/>\n    $format-&gt;set_color('red');<br \/>\n    $format-&gt;set_align('center');<br \/>\n    # my $date_format = $workbook-&gt;add_format({num_format =&gt; 'yyyy-mm-ddThh:mm:ss.sss'});<br \/>\n    $date_format = $workbook-&gt;add_format(<br \/>\n      bold       =&gt; 1,<br \/>\n      align      =&gt; 'center',<br \/>\n      num_format =&gt; 'yyyy-mm-dd hh:mm'<br \/>\n    );<br \/>\n<br \/>\n    # Write a formatted and unformatted string, row and column notation.<br \/>\n    $col = $row = 0;<br \/>\n    $worksheet-&gt;write($row, $col, \"$first_name $last_name\", $format);<br \/>\n    $worksheet-&gt;write(1,    $col, 'My Study Guide', $format);<br \/>\n<br \/>\n    # Write some text<br \/>\n    #$page1-&gt;stringc($font, 40, 306, 426, \"$first_name $last_name\");<br \/>\n    #$page1-&gt;stringc($font, 20, 306, 396, \"My Study Guide\");<br \/>\n    ##$page1-&gt;stringc($font, 20, 306, 300, 'by John Doe &lt;john.doe@example.com&gt;');<br \/>\n<br \/>\n    # my $status = system(\"open HTTP:\/\/localhost:8888\/macos_say_record.php?docronwork=say%20$first_name%20$last_name\");<br \/>\n<br \/>\n    # Write a number and a formula using A1 notation<br \/>\n    $worksheet-&gt;write(\"${coln}3\", \"$tt\");<br \/>\n    $date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(2, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}4\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    $date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(3, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}5\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    $date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(4, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}6\", \"$imageurl\" . \"#$imgei\");<br \/>\n    $date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(5, $dcol, $date, $date_format);<br \/>\n    $alinkis = \"&lt;a download=perl.xlsm href='\/\/www.rjmprogramming.com.au\/perl.xlsm' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;<font color=purple>&lt;button data-alt=\\\"$tt\\\" class=hear style=cursor:pointer;background-color:lightgreen;display:inline-block; ondblclick=\\\"exthear('$tt');\\\" onclick=\\\"hear('$tt');\\\" data-href='\/\/www.rjmprogramming.com.au\/perl.pdf' title='Hear This Perhaps ... relies on MacOS MAMP HTTP:\/\/localhost:8888\/macos_say_record.php text to audio ... download instructions, as relevant, can be determined via a read of https:\/\/www.rjmprogramming.com.au\/ITblog\/mamp-timekeeping-web-application-visibility-tutorial\/ ... double click tries audio into the wording of the blog posting content'&gt;&amp;#128066;&lt;\/button&gt;&amp;nbsp;&amp;nbsp;<\/font>&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details id=myd&gt;&lt;summary style=background-color:#f0f0f0; id=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;&lt;div class=divcont&gt;$cont&lt;\/div&gt;&lt;\/details&gt;\\n\";<br \/>\n  } else {<br \/>\n    $trown += 4;<br \/>\n    $date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$tt\");<br \/>\n    $date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    $date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    $date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$imageurl\" . \"#$imgei\");<br \/>\n    $alinkis = \"&lt;a download=perl.xlsm href='\/\/www.rjmprogramming.com.au\/perl.xlsm' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;<font color=purple>&lt;button data-alt=\\\"$tt\\\" class=hear style=cursor:pointer;background-color:lightgreen;display:inline-block; ondblclick=\\\"exthear('$tt');\\\" onclick=\\\"hear('$tt');\\\" data-href='\/\/www.rjmprogramming.com.au\/perl.pdf' title='Hear This Perhaps ... relies on MacOS MAMP HTTP:\/\/localhost:8888\/macos_say_record.php text to audio ... download instructions, as relevant, can be determined via a read of https:\/\/www.rjmprogramming.com.au\/ITblog\/mamp-timekeeping-web-application-visibility-tutorial\/ ... double click tries audio into the wording of the blog posting content'&gt;&amp;#128066;&lt;\/button&gt;&amp;nbsp;&amp;nbsp;<\/font>&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details class=myd&gt;&lt;summary style=background-color:#f0f0f0; class=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;&lt;div class=divcont&gt;$cont&lt;\/div&gt;&lt;\/details&gt;\\n\";<br \/>\n  }<br \/>\n  # print \"@row\\n\";<br \/>\n }<br \/>\n # }<br \/>\n}<br \/>\n<br \/>\nprint \"&lt;\/h4&gt;\" . $rest . \"&lt;br&gt;&lt;br&gt;&lt;iframe id=myif src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<br \/>\n<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.cgi-----GETME\">the changed Perl<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi-----GETME\">hello_get.cgi<\/a> code supervised by (and working with) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.html-----GETME\">the changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html-----GETME\">hello_get.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\" title=\"Click picture\">web application<\/a> we hope you (re-)try for yourself.<\/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\/new-perl-cgi-intranet-audio-tutorial\/'>Perl CGI UIntranet Audio Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgiurlct'>Previous relevant <a target=_blank title='Perl CGI URL Content Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-url-content-tutorial\/'>Perl CGI URL Content Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI URL Content Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_url.jpg\" title=\"Perl CGI URL Content Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI URL Content Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Perl CGI Spreadsheet Module Sorting Tutorial' href='#pcgismst'>Perl CGI Spreadsheet Module Sorting Tutorial<\/a>, today, we introduce a new Perl module &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank title='LWP::UserAgent' href='https:\/\/metacpan.org\/pod\/LWP::UserAgent'>LWP::UserAgent<\/a><br \/>\n<\/code><\/p>\n<p> &#8230; which can help us reach the content of a user nominated URL.<\/p>\n<p>From <a target=_blank title='LWP::UserAgent' href='https:\/\/metacpan.org\/pod\/LWP::UserAgent'>LWP::UserAgent<\/a> doing it&#8217;s stuff, the rest of the <font color=blue>changed Perl code<\/font> below &#8230;<\/p>\n<ul>\n<li>turns relative references into absolute ones &#8230; within an &#8230;<\/li>\n<li>iframe &#8230; with &#8230;<\/li>\n<li>reworked content placed into the <a target=_blank title='HTML iframe srcdoc attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_iframe_srcdoc.asp'><i>srcdoc<\/i><\/a> attribute &#8230; nested in &#8230;<\/li>\n<li>details\/summary (with an &#8220;a&#8221; link) &#8220;reveal&#8221; scenario<\/li>\n<\/ul>\n<p> &#8230; in &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\nuse DBI;<br \/>\nuse DBD::mysql;<br \/>\nuse Spreadsheet::WriteExcel;<br \/>\nuse Data::Dumper qw(Dumper);<br \/>\n<font color=blue>use LWP::UserAgent ();<\/font><br \/>\n#use Unicode::Escape;<br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n}<br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\n<font color=blue>my $rest = \"\";<\/font><br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n<font color=blue>$inurl = $FORM{inurl};<br \/>\nmy $before_page = \"\";<br \/>\nmy $allbutlastbit = \"\";<br \/>\nmy $lastbit = (split '\/', $ENV{REQUEST_URI})[-1];<br \/>\nmy $page_url = 'http';<br \/>\n$page_url.='s' if $ENV{HTTPS};<br \/>\n$page_url.=':\/\/';<br \/>\nif ($ENV{SERVER_PORT} != 80) {<br \/>\n    $before_page=\"$ENV{SERVER_NAME}:$ENV{SERVER_PORT}\/\";<br \/>\n    $page_url.=\"$ENV{SERVER_NAME}:$ENV{SERVER_PORT}$ENV{REQUEST_URI}\";<br \/>\n} else {<br \/>\n    $before_page=\"$ENV{SERVER_NAME}\/\";<br \/>\n    $page_url.=\"$ENV{SERVER_NAME}.$ENV{REQUEST_URI}\";<br \/>\n}<br \/>\nif (length($lastbit) &gt; 0) {<br \/>\n    $allbutlastbit = substr($page_url, 0, (length($page_url) - length($lastbit)));<br \/>\n} else {<br \/>\n    $allbutlastbit = $page_url;<br \/>\n}<br \/>\n<br \/>\nif (length($inurl) == 0) {<br \/>\n $inurl = $inurl;<br \/>\n} else {<br \/>\n $inurl =~ s\/%3A\/:\/ig;<br \/>\n $inurl =~ s\/%2F\/\\\/\/ig;<br \/>\n $inurl =~ s\/%3F\/?\/ig;<br \/>\n $inurl =~ s\/%26\/&\/ig;<br \/>\n my $ipage_url = $inurl;<br \/>\n my $ibefore_page = \"\";<br \/>\n my $iallbutlastbit = \"\";<br \/>\n my $ilastbit = (split '\/', $inurl)[-1];<br \/>\n my $lenseven = (7 + length($ilastbit));<br \/>\n my $leneight = (8 + length($ilastbit));<br \/>\n my $leni = length($inurl);<br \/>\n if (length($ilastbit) &gt; 0) {<br \/>\n    if ($lenseven == $leni) {<br \/>\n    $iallbutlastbit = \"${inurl}\/\";<br \/>\n    } elsif ($leneight == $leni) {<br \/>\n    $iallbutlastbit = \"${inurl}\/\";<br \/>\n    } else {<br \/>\n    $iallbutlastbit = substr($ipage_url, 0, (length($ipage_url) - length($ilastbit)));<br \/>\n    }<br \/>\n } else {<br \/>\n    $iallbutlastbit = $ipage_url;<br \/>\n }<br \/>\n<br \/>\n my $ua = LWP::UserAgent-&gt;new(timeout =&gt; 10);<br \/>\n $ua-&gt;env_proxy;<br \/>\n<br \/>\n my $response = $ua-&gt;get($inurl);<br \/>\n<br \/>\n if ($response-&gt;is_success) {<br \/>\n    my $dcont = $response-&gt;decoded_content;<br \/>\n    #$dcont =~ s\/html\\&gt;\/div\\&gt;\/ig;<br \/>\n    #$dcont =~ s\/body\\&gt;\/div\\&gt;\/ig;<br \/>\n    $dcont =~ s\/\"\\\/\\\/\/&amp;#34;\\\/\\\/\/ig;<br \/>\n    $dcont =~ s\/\"http\/&amp;#34;http\/ig;<br \/>\n    $dcont =~ s\/\"file\/&amp;#34;file\/ig;<br \/>\n    $dotdot = \"..\\\/\";<br \/>\n    if (index($dcont, \"rjmprogramming.com.au\") &gt;= 0) {<br \/>\n      $allbutlastbit =~ s\/:443\/\/ig;<br \/>\n      $allbutlastbit =~ s\/\\\/cgi-bin\\\/\/\\\/\/ig;<br \/>\n      if (substr($allbutlastbit, -1, 1) == \"\/\") {<br \/>\n        $allbutlastbit = substr($allbutlastbit, 0, (-1 + length($allbutlastbit)));<br \/>\n      }<br \/>\n      $dcont =~ s\/\"\\\/\/&amp;#34;${allbutlastbit}\\\/\/ig;<br \/>\n      #$dcont =~ s\/ src=\"\/ src=\"..\\\/\/ig;<br \/>\n      #$dcont =~ s\/ href=\"\/ href=\"..\\\/\/ig;<br \/>\n      $dcont =~ s\/ src=\"\/ src=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ action=\"\/ action=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ srcset=\"\/ srcset=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ href=\"\/ href=\"${dotdot}\/ig;<br \/>\n    } else {<br \/>\n      if (index($dcont, \"wikipedia.org\") &gt;= 0) {<br \/>\n      $dotdot =~ s\/\\\/wiki\\\/\/\\\/\/ig;<br \/>\n      ${iallbutlastbit} =~ s\/\\\/wiki\\\/\/\\\/\/ig;<br \/>\n      } else {<br \/>\n      $dotdot = $iallbutlastbit;<br \/>\n      }<br \/>\n      if (substr($iallbutlastbit, -1, 1) == \"\/\") {<br \/>\n        $iallbutlastbit = substr($iallbutlastbit, 0, (-1 + length($iallbutlastbit)));<br \/>\n      }<br \/>\n      $dcont =~ s\/\"\\\/\/&amp;#34;${iallbutlastbit}\\\/\/ig;<br \/>\n      $dcont =~ s\/ src=\"\/ src=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ srcset=\"\/ srcset=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ action=\"\/ action=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/ href=\"\/ href=\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/url\\(\"\/url\\(\"${dotdot}\/ig;<br \/>\n      $dcont =~ s\/url\\(portal\\\/\/url\\(${dotdot}portal\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(static\\\/\/url\\(${dotdot}static\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(wiki\\\/\/url\\(${dotdot}wiki\\\/\/ig;<br \/>\n      $dcont =~ s\/url\\(er\\\/\/url\\(${dotdot}er\\\/\/ig;<br \/>\n    }<br \/>\n    $dcont =~ s\/\"\/&amp;#34;\/ig;<br \/>\n    $dcont =~ s\/\\r\\n\/\/ig;<br \/>\n    $dcont =~ s\/\\n\/\/ig;<br \/>\n    $dcont =~ s\/\\r\/\/ig;<br \/>\n    # print \"Content-type: text\/html\\n\\n\";<br \/>\n    $rest .= \"&lt;br&gt;&lt;details id=drest&gt;&lt;summary&gt;&lt;h3&gt;&lt;a target=_blank href=$inurl&gt;$inurl&lt;\/a&gt;&lt;\/h3&gt;&lt;\/summary&gt;&lt;br&gt;&lt;iframe style=width:100%;height:900px; srcdoc=\\\"\" . $dcont . \"\\\"&gt;&lt;\/iframe&gt;&lt;\/details&gt;&lt;br&gt;\";<br \/>\n }<br \/>\n #else {<br \/>\n #    die $response-&gt;status_line;<br \/>\n #}<br \/>\n}<\/font><br \/>\n$blogp  = $FORM{blogp};<br \/>\n$blogp =~ s\/%2C\/,\/ig;<br \/>\n$blogi = $blogp;<br \/>\nmy $blogt  = $FORM{blogt};<br \/>\n$blogt =~ s\/%2C\/,\/ig;<br \/>\n$oneletter = substr( $first_name, 0, 1 );<br \/>\n<br \/>\n#my $uemoji  = Unicode::Escape-&gt;new($FORM{emoji});<br \/>\nmy $emoji = chr(0x0001F517); # \"\\xf0\\x9f\\x98\\x80\"; #$uemoji-&gt;unescape;<br \/>\n#my $ucutei  = Unicode::Escape-&gt;new($FORM{cutei});<br \/>\nmy $cutei = chr(0x0001F3C3); # \"\\xf0\\x9f\\x98\\x80\"; #$ucutei-&gt;unescape;<br \/>\n#my $uimgei  = Unicode::Escape-&gt;new($FORM{imgei});<br \/>\nmy $imgei = chr(0x0001F5BC); # \"\\xf0\\x9f\\x98\\x80\"; #$uimgei-&gt;unescape;<br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n<br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n<br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n<br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n<br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n<br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n<br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n<br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n<br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\n$tt = \"\";<br \/>\n$cont = \"\";<br \/>\n$oneletter = \" \";<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" var ls='', ns='', qwr=''; \";<br \/>\nprint \" function zeroize(iinsf) { var insf=iinsf; var sep='\/', i=0; while (insf.substring(i).substring(0,1) &gt;= '0' && insf.substring(i).substring(0,1) &lt;= '9') { i++; } sep=insf.substring(i).substring(0,1); \";<br \/>\nprint \"   var arr=insf.split(sep); \";<br \/>\nprint \"   if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"    if (eval('' + arr[1].length) == 1) { insf=insf.replace(sep + arr[1] + sep, sep + '0' + arr[1] + sep);  } \";<br \/>\nprint \"    if (eval('' + arr[0].length) == 1) { insf='0' + insf;  } \";<br \/>\nprint \"    arr=insf.split(' ')[1].split(':'); \";<br \/>\nprint \"    if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"      if (insf.indexOf(' pm') != -1) { insf=insf.replace(' ' + arr[0].trim() + ':', ' ' + eval(12 + eval('' + arr[0].trim())) + ':').replace(' pm', ' ');  arr=insf.split(' ')[1].split(':');   } \";<br \/>\nprint \"      if (eval(-1 + eval('' + arr[1])) == eval('' + document.getElementById('mystime').innerHTML.split(':')[1])) {  insf=insf.replace(':' + arr[1] + ':', ':' + document.getElementById('mystime').innerHTML.split(':')[1] + ':');  arr[1]='zz';   } \";<br \/>\nprint \"      if (eval('' + arr[1].length) == 1) { insf=insf.replace(':' + arr[1] + ':', ':0' + arr[1] + ':');  } \";<br \/>\nprint \"      if (eval('' + arr[0].trim().length) == 1) { insf=insf.replace(arr[0].trim() + ':', '0' + arr[0].trim() + ':');  } \";<br \/>\nprint \"    } \";<br \/>\nprint \"   } \";<br \/>\nprint \"   return insf; \";<br \/>\nprint \" } \";<br \/>\nprint \" function loctime() { if (ls == '') { \";<br \/>\nprint \"   qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   ls=zeroize(('' + d.toLocaleString()).replace(',','')) + ' &lt;a onclick=alert(qwr); style=cursor:pointer;text-decoration:underline;&gt;GMT' + d.toString().split(' GMT')[1] + '&lt;\/a&gt;'; } if (!document.getElementById('mytime')) { setTimeout(loctime,1000); } else { \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); } \";<br \/>\nprint \" } \";<br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=setTimeout(loctime,1000);&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;Hello $first_name $last_name &lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;&lt;h4&gt;\";<br \/>\n<br \/>\nif ($blogp == \"\") {<br \/>\n $blogp = $first_name;<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n}<br \/>\n<br \/>\nif ($blogp != \"\") {<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n<br \/>\n if ((ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) || ord($oneletter) == 40 ){<br \/>\n  my ($oneurl) = split \/,\/, $blogp;<br \/>\n<br \/>\n  if ($oneurl == $blogp) {<br \/>\n   $oneletter = substr( $blogp, 0, 1 );<br \/>\n  } else {<br \/>\n   if (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) {<br \/>\n     $oneletter = \"1\";<br \/>\n     $blogp = \"( $blogp )\";<br \/>\n   } else {<br \/>\n     $oneletter = \"2\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n }<br \/>\n}<br \/>\n<br \/>\nif (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")){<br \/>\n # \/*** mysql hostname ***\/<br \/>\n $hostname = 'dbhost';<br \/>\n<br \/>\n # \/*** mysql username ***\/<br \/>\n $username = 'username';<br \/>\n<br \/>\n # \/*** mysql ***\/<br \/>\n $password = 'password';<br \/>\n<br \/>\n $dbname = 'dbname';<br \/>\n<br \/>\n $tname = 'table_name';<br \/>\n $hostname = \"DBI:mysql:$dbname:$hostname\";<br \/>\n<br \/>\n $dbh = DBI-&gt;connect($hostname, $username, $password);<br \/>\n<br \/>\n my ($oneaurl) = split \/,\/, $blogp;<br \/>\n if (index($blogp, ',') &lt;= 0) {<br \/>\n   $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID=?\");<br \/>\n } else {<br \/>\n   if (ord($oneletter) != 40) {<br \/>\n     $blogp = \"($blogp)\";<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   } else {<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n if ($blogp == \"\") {<br \/>\n  $sth-&gt;execute();<br \/>\n } else {<br \/>\n  $sth-&gt;execute( $blogp );<br \/>\n }<br \/>\n<br \/>\n $one = 0;<br \/>\n $two = 10;<br \/>\n $exc = 0;<br \/>\n $coln = \"A\";<br \/>\n $dcol = 1;<br \/>\n $rown = 6;<br \/>\n $trown = 6;<br \/>\n $alinkis = \"\";<br \/>\n my $workbook = 0; # Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<br \/>\n my $date_format = 0;<br \/>\n my $date = 0;<br \/>\n<br \/>\n # Set the default format for dates.<br \/>\n<br \/>\n while (($tt, $cont, $iid) = $sth-&gt;fetchrow_array()) {<br \/>\n  my ($idis) = split \/,\/, $blogi, 1;<br \/>\n  my ($yyyymmdd) =  substr( $blogt, $one, $two ); # split \/,\/, $blogt, 1;<br \/>\n  my ($junk, $imageu) = split \/ src=\"\/, $cont;<br \/>\n  my ($imageurl) = split \/\"\/, $imageu;<br \/>\n  my ($junk, $cutto) = split \/ href=\"\/, $cont;<br \/>\n  my ($cuttothechase) = split \/\"\/, $cutto;<br \/>\n  $blogt = substr( $blogt, 11 );<br \/>\n  if ($exc == 0) {<br \/>\n    $exc = 1;<br \/>\n    # Create a new Excel workbook<br \/>\n    $workbook = Spreadsheet::WriteExcel-&gt;new('..\/perl.xlsm');<br \/>\n<br \/>\n    # Add a worksheet<br \/>\n    $worksheet = $workbook-&gt;add_worksheet();<br \/>\n    $worksheet-&gt;set_column(0, 0,  90);<br \/>\n    $worksheet-&gt;set_column(1, 0,  30);<br \/>\n<br \/>\n    #  Add and define a format<br \/>\n    $format = $workbook-&gt;add_format(); # Add a format<br \/>\n    $format-&gt;set_bold();<br \/>\n    $format-&gt;set_color('red');<br \/>\n    $format-&gt;set_align('center');<br \/>\n    # my $date_format = $workbook-&gt;add_format({num_format =&gt; 'yyyy-mm-ddThh:mm:ss.sss'});<br \/>\n    $date_format = $workbook-&gt;add_format(<br \/>\n      bold       =&gt; 1,<br \/>\n      align      =&gt; 'center',<br \/>\n      num_format =&gt; 'yyyy-mm-dd hh:mm'<br \/>\n    );<br \/>\n<br \/>\n    # Write a formatted and unformatted string, row and column notation.<br \/>\n    $col = $row = 0;<br \/>\n    $worksheet-&gt;write($row, $col, \"$first_name $last_name\", $format);<br \/>\n    $worksheet-&gt;write(1,    $col, 'My Study Guide');<br \/>\n<br \/>\n    # Write a number and a formula using A1 notation<br \/>\n    $worksheet-&gt;write(\"${coln}3\", \"$tt\");<br \/>\n    $date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(2, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}4\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    $date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(3, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}5\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    $date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(4, $dcol, $date, $date_format);<br \/>\n    $worksheet-&gt;write(\"${coln}6\", \"$imageurl\" . \"#$imgei\");<br \/>\n    $date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(5, $dcol, $date, $date_format);<br \/>\n    $alinkis = \"&lt;a download=perl.xlsm href='\/\/www.rjmprogramming.com.au\/perl.xlsm' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details id=myd&gt;&lt;summary style=background-color:#f0f0f0; id=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  } else {<br \/>\n    $trown += 4;<br \/>\n    $date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$tt\");<br \/>\n    $date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    $date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    $date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$imageurl\" . \"#$imgei\");<br \/>\n    $alinkis = \"&lt;a download=perl.xlsm href='\/\/www.rjmprogramming.com.au\/perl.xlsm' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details class=myd&gt;&lt;summary style=background-color:#f0f0f0; class=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  }<br \/>\n  # print \"@row\\n\";<br \/>\n }<br \/>\n # }<br \/>\n}<br \/>\n<br \/>\nprint \"&lt;\/h4&gt;<font color=blue>\" . $rest . \"<\/font>&lt;br&gt;&lt;br&gt;&lt;iframe id=myif src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<br \/>\n<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.cgi----GETME\">the changed Perl<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi----GETME\">hello_get.cgi<\/a> code supervised by (and working with) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.html----GETME\">the changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html----GETME\">hello_get.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\" title=\"Click picture\">web application<\/a> we hope you (re-)try for yourself.<\/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\/perl-cgi-url-content-tutorial\/'>Perl CGI URL Content Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgismst'>Previous relevant <a target=_blank title='Perl CGI Spreadsheet Module Sorting Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-spreadsheet-module-sorting-tutorial\/'>Perl CGI Spreadsheet Module Sorting Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI Spreadsheet Module Sorting Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_spreadsheet.gif\" title=\"Perl CGI Spreadsheet Module Sorting Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI Spreadsheet Module Sorting Tutorial<\/p><\/div>\n<p>Spreadsheets can be a great aid where online activities might coincide, via downloading, to desktop activities.  So, we want to delve further into the spreadsheet functionality we started with yesterday&#8217;s <a title='Perl CGI Spreadsheet Module Tutorial' href='#pcgismt'>Perl CGI Spreadsheet Module Tutorial<\/a>.<\/p>\n<p>We decided &#8230;<\/p>\n<ul>\n<li>to add a second column with timestamps &#8230; to facilitate &#8230;<\/li>\n<li>spreadsheet sorting possibilities via <a target=_blank title=Excel href='https:\/\/www.microsoft.com\/en-us\/microsoft-365\/excel'>Excel<\/a> (or <a target=_blank title=LibreOffice href='https:\/\/www.libreoffice.org\/'>LibreOffice<\/a>) &#8230;<br \/>\n<code><br \/>\nData -&gt; Sort<br \/>\n<\/code><br \/>\n &#8230; as well as &#8230;\n<\/li>\n<li>column width setting &#8230; via &#8230;<br \/>\n<code><br \/>\n    $worksheet-&gt;set_column(0, 0,  90);<br \/>\n    $worksheet-&gt;set_column(1, 0,  30);<br \/>\n<\/code><br \/>\n &#8230; and &#8230;\n<\/li>\n<li>add an emoji hashtag component to the three links associated with each blog posting reference &#8230; so that &#8230;\n<ol>\n<li>the link cells become more self explanatory without the need for any new columns to explain &#8230;<\/li>\n<li>we add graphical interest to the spreadsheet data<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; in <font color=blue>the changed<\/font> &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\nuse DBI;<br \/>\nuse DBD::mysql;<br \/>\nuse Spreadsheet::WriteExcel;<br \/>\nuse Data::Dumper qw(Dumper);<br \/>\n<font color=blue>#use Unicode::Escape;<\/font><br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n}<br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n$blogp  = $FORM{blogp};<br \/>\n$blogp =~ s\/%2C\/,\/ig;<br \/>\n<font color=blue>$blogi = $blogp;<br \/>\nmy $blogt  = $FORM{blogt};<br \/>\n$blogt =~ s\/%2C\/,\/ig;<\/font><br \/>\n$oneletter = substr( $first_name, 0, 1 );<br \/>\n<br \/>\n<font color=blue>#my $uemoji  = Unicode::Escape-&gt;new($FORM{emoji});<br \/>\nmy $emoji = chr(0x0001F517); # \"\\xf0\\x9f\\x98\\x80\"; #$uemoji-&gt;unescape;<br \/>\n#my $ucutei  = Unicode::Escape-&gt;new($FORM{cutei});<br \/>\nmy $cutei = chr(0x0001F3C3); # \"\\xf0\\x9f\\x98\\x80\"; #$ucutei-&gt;unescape;<br \/>\n#my $uimgei  = Unicode::Escape-&gt;new($FORM{imgei});<br \/>\nmy $imgei = chr(0x0001F5BC); # \"\\xf0\\x9f\\x98\\x80\"; #$uimgei-&gt;unescape;<\/font><br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n<br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n<br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n<br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n<br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n<br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n<br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n<br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n<br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\n$tt = \"\";<br \/>\n$cont = \"\";<br \/>\n$oneletter = \" \";<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" var ls='', ns='', qwr=''; \";<br \/>\nprint \" function zeroize(iinsf) { var insf=iinsf; var sep='\/', i=0; while (insf.substring(i).substring(0,1) &gt;= '0' && insf.substring(i).substring(0,1) &lt;= '9') { i++; } sep=insf.substring(i).substring(0,1); \";<br \/>\nprint \"   var arr=insf.split(sep); \";<br \/>\nprint \"   if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"    if (eval('' + arr[1].length) == 1) { insf=insf.replace(sep + arr[1] + sep, sep + '0' + arr[1] + sep);  } \";<br \/>\nprint \"    if (eval('' + arr[0].length) == 1) { insf='0' + insf;  } \";<br \/>\nprint \"    arr=insf.split(' ')[1].split(':'); \";<br \/>\nprint \"    if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"      if (insf.indexOf(' pm') != -1) { insf=insf.replace(' ' + arr[0].trim() + ':', ' ' + eval(12 + eval('' + arr[0].trim())) + ':').replace(' pm', ' ');  arr=insf.split(' ')[1].split(':');   } \";<br \/>\nprint \"      if (eval(-1 + eval('' + arr[1])) == eval('' + document.getElementById('mystime').innerHTML.split(':')[1])) {  insf=insf.replace(':' + arr[1] + ':', ':' + document.getElementById('mystime').innerHTML.split(':')[1] + ':');  arr[1]='zz';   } \";<br \/>\nprint \"      if (eval('' + arr[1].length) == 1) { insf=insf.replace(':' + arr[1] + ':', ':0' + arr[1] + ':');  } \";<br \/>\nprint \"      if (eval('' + arr[0].trim().length) == 1) { insf=insf.replace(arr[0].trim() + ':', '0' + arr[0].trim() + ':');  } \";<br \/>\nprint \"    } \";<br \/>\nprint \"   } \";<br \/>\nprint \"   return insf; \";<br \/>\nprint \" } \";<br \/>\nprint \" function loctime() { if (ls == '') { \";<br \/>\nprint \"   qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   ls=zeroize(('' + d.toLocaleString()).replace(',','')) + ' &lt;a onclick=alert(qwr); style=cursor:pointer;text-decoration:underline;&gt;GMT' + d.toString().split(' GMT')[1] + '&lt;\/a&gt;'; } if (!document.getElementById('mytime')) { setTimeout(loctime,1000); } else { \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); } \";<br \/>\nprint \" } \";<br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=setTimeout(loctime,1000);&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;Hello $first_name $last_name &lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;&lt;h4&gt;\";<br \/>\n<br \/>\nif ($blogp == \"\") {<br \/>\n $blogp = $first_name;<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n}<br \/>\n<br \/>\nif ($blogp != \"\") {<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n<br \/>\n if ((ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) || ord($oneletter) == 40 ){<br \/>\n  my ($oneurl) = split \/,\/, $blogp;<br \/>\n<br \/>\n  if ($oneurl == $blogp) {<br \/>\n   $oneletter = substr( $blogp, 0, 1 );<br \/>\n  } else {<br \/>\n   if (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) {<br \/>\n     $oneletter = \"1\";<br \/>\n     $blogp = \"( $blogp )\";<br \/>\n   } else {<br \/>\n     $oneletter = \"2\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n }<br \/>\n}<br \/>\n<br \/>\nif (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")){<br \/>\n # \/*** mysql hostname ***\/<br \/>\n $hostname = 'dbhost';<br \/>\n<br \/>\n # \/*** mysql username ***\/<br \/>\n $username = 'username';<br \/>\n<br \/>\n # \/*** mysql ***\/<br \/>\n $password = 'password';<br \/>\n<br \/>\n $dbname = 'dbname';<br \/>\n<br \/>\n $tname = 'table_name';<br \/>\n $hostname = \"DBI:mysql:$dbname:$hostname\";<br \/>\n<br \/>\n $dbh = DBI-&gt;connect($hostname, $username, $password);<br \/>\n<br \/>\n my ($oneaurl) = split \/,\/, $blogp;<br \/>\n if (index($blogp, ',') &lt;= 0) {<br \/>\n   $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID=?\");<br \/>\n } else {<br \/>\n   if (ord($oneletter) != 40) {<br \/>\n     $blogp = \"($blogp)\";<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   } else {<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n if ($blogp == \"\") {<br \/>\n  $sth-&gt;execute();<br \/>\n } else {<br \/>\n  $sth-&gt;execute( $blogp );<br \/>\n }<br \/>\n<br \/>\n <font color=blue>$one = 0;<br \/>\n $two = 10;<\/font><br \/>\n $exc = 0;<br \/>\n $coln = \"A\";<br \/>\n <font color=blue>$dcol = 1;<\/font><br \/>\n $rown = 6;<br \/>\n $trown = 6;<br \/>\n $alinkis = \"\";<br \/>\n my $workbook = 0; # Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<br \/>\n <font color=blue>my $date_format = 0;<br \/>\n my $date = 0;<\/font><br \/>\n<br \/>\n # Set the default format for dates.<br \/>\n<br \/>\n while (($tt, $cont, $iid) = $sth-&gt;fetchrow_array()) {<br \/>\n  <font color=blue>my ($idis) = split \/,\/, $blogi, 1;<br \/>\n  my ($yyyymmdd) =  substr( $blogt, $one, $two ); # split \/,\/, $blogt, 1;<\/font><br \/>\n  my ($junk, $imageu) = split \/ src=\"\/, $cont;<br \/>\n  my ($imageurl) = split \/\"\/, $imageu;<br \/>\n  my ($junk, $cutto) = split \/ href=\"\/, $cont;<br \/>\n  my ($cuttothechase) = split \/\"\/, $cutto;<br \/>\n  <font color=blue>$blogt = substr( $blogt, 11 );<\/font><br \/>\n  if ($exc == 0) {<br \/>\n    $exc = 1;<br \/>\n    # Create a new Excel workbook<br \/>\n    $workbook = Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<br \/>\n<br \/>\n    # Add a worksheet<br \/>\n    $worksheet = $workbook-&gt;add_worksheet();<br \/>\n    <font color=blue>$worksheet-&gt;set_column(0, 0,  90);<br \/>\n    $worksheet-&gt;set_column(1, 0,  30);<\/font><br \/>\n<br \/>\n    #  Add and define a format<br \/>\n    $format = $workbook-&gt;add_format(); # Add a format<br \/>\n    $format-&gt;set_bold();<br \/>\n    $format-&gt;set_color('red');<br \/>\n    $format-&gt;set_align('center');<br \/>\n    <font color=blue># my $date_format = $workbook-&gt;add_format({num_format =&gt; 'yyyy-mm-ddThh:mm:ss.sss'});<br \/>\n    $date_format = $workbook-&gt;add_format(<br \/>\n      bold       =&gt; 1,<br \/>\n      align      =&gt; 'center',<br \/>\n      num_format =&gt; 'yyyy-mm-dd hh:mm'<br \/>\n    );<\/font><br \/>\n<br \/>\n    # Write a formatted and unformatted string, row and column notation.<br \/>\n    $col = $row = 0;<br \/>\n    $worksheet-&gt;write($row, $col, \"$first_name $last_name\", $format);<br \/>\n    # $worksheet-&gt;write(1,    $col, 'Hi Excel!');<br \/>\n<br \/>\n    # Write a number and a formula using A1 notation<br \/>\n    $worksheet-&gt;write(\"${coln}3\", \"$tt\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(2, $dcol, $date, $date_format);<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}4\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(3, $dcol, $date, $date_format);<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}5\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(4, $dcol, $date, $date_format);<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}6\", \"$imageurl\" . \"#$imgei\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time(5, $dcol, $date, $date_format);<\/font><br \/>\n    $alinkis = \"&lt;a download=perl.xls href='\/\/www.rjmprogramming.com.au\/perl.xls' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details id=myd&gt;&lt;summary style=background-color:#f0f0f0; id=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  } else {<br \/>\n    $trown += 4;<br \/>\n    <font color=blue>$date = sprintf \"%sT03:00:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$tt\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:01:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\" . \"#$emoji\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:02:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$cuttothechase\" . \"#$cutei\");<br \/>\n    <font color=blue>$date = sprintf \"%sT03:03:00.000Z\", $yyyymmdd;<br \/>\n    $worksheet-&gt;write_date_time($rown, $dcol, $date, $date_format);<br \/>\n    $rown += 1;<\/font><br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$imageurl\" . \"#$imgei\");<br \/>\n    $alinkis = \"&lt;a download=perl.xls href='\/\/www.rjmprogramming.com.au\/perl.xls' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details class=myd&gt;&lt;summary style=background-color:#f0f0f0; class=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  }<br \/>\n  # print \"@row\\n\";<br \/>\n }<br \/>\n # }<br \/>\n}<br \/>\n<br \/>\nprint \"&lt;\/h4&gt;&lt;br&gt;&lt;br&gt;&lt;iframe id=myif src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.cgi---GETME\">the changed Perl<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi---GETME\">hello_get.cgi<\/a> code supervised by (and working with) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.html---GETME\">the changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html---GETME\">hello_get.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\" title=\"Click picture\">web application<\/a> we hope you try for yourself.<\/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\/perl-cgi-spreadsheet-module-sorting-tutorial\/'>Perl CGI Spreadsheet Module Sorting Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgismt'>Previous relevant <a target=_blank title='Perl CGI Spreadsheet Module Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-spreadsheet-module-tutorial\/'>Perl CGI Spreadsheet Module Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI Spreadsheet Module Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_excel.jpg\" title=\"Perl CGI Spreadsheet Module Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI Spreadsheet Module Tutorial<\/p><\/div>\n<p>Adding onto yesterday&#8217;s <a title='Perl CGI DBI Module Tutorial' href='#pcgidbimt'>Perl CGI DBI Module Tutorial<\/a> &#8230;<\/p>\n<ul>\n<li>use of Perl module DateTime &#8230; <\/li>\n<li>use of Perl module <a target=_blank href='https:\/\/metacpan.org\/pod\/DBI' title='Perl module DBI information'>DBI<\/a> &#8230; Perl module exploration, and today, we dip our toes into &#8230;<\/li>\n<li>use of Perl module <a target=_blank href='https:\/\/metacpan.org\/pod\/Spreadsheet::WriteExcel'>Spreadsheet<font size=1>::WriteExcel<\/font><\/a> &#8230; and to help with simulating PHP&#8217;s explode function &#8230;<\/li>\n<li>use of Perl module  <a target=_blank title='Perl Data::Dumper module information' href='https:\/\/metacpan.org\/pod\/Data::Dumper'>Data<font size=1>::Dumper<\/font><\/a> and its <a target=_blank title='Perl split information' href='https:\/\/perlmaven.com\/perl-split#:~:text=PHP%20has%20the%20explode%20function,the%20function%20is%20called%20split.'>split<\/a> function<\/li>\n<\/ul>\n<p> &#8230; with <font color=blue>modified Perl<\/font> code as per &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\nuse DBI;<br \/>\nuse DBD::mysql;<br \/>\n<font color=blue>use Spreadsheet::WriteExcel;<br \/>\nuse Data::Dumper qw(Dumper);<\/font><br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n}<br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n$blogp  = $FORM{blogp};<br \/>\n<font color=blue>$blogp =~ s\/%2C\/,\/ig;<\/font><br \/>\n$oneletter = substr( $first_name, 0, 1 );<br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n<br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n<br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n<br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n<br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n<br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n<br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n<br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n<br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\n$tt = \"\";<br \/>\n$cont = \"\";<br \/>\n$oneletter = \" \";<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" var ls='', ns='', qwr=''; \";<br \/>\nprint \" function zeroize(iinsf) { var insf=iinsf; var sep='\/', i=0; while (insf.substring(i).substring(0,1) &gt;= '0' && insf.substring(i).substring(0,1) &lt;= '9') { i++; } sep=insf.substring(i).substring(0,1); \";<br \/>\nprint \"   var arr=insf.split(sep); \";<br \/>\nprint \"   if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"    if (eval('' + arr[1].length) == 1) { insf=insf.replace(sep + arr[1] + sep, sep + '0' + arr[1] + sep);  } \";<br \/>\nprint \"    if (eval('' + arr[0].length) == 1) { insf='0' + insf;  } \";<br \/>\nprint \"    arr=insf.split(' ')[1].split(':'); \";<br \/>\nprint \"    if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"      if (insf.indexOf(' pm') != -1) { insf=insf.replace(' ' + arr[0].trim() + ':', ' ' + eval(12 + eval('' + arr[0].trim())) + ':').replace(' pm', ' ');  arr=insf.split(' ')[1].split(':');   } \";<br \/>\nprint \"      if (eval(-1 + eval('' + arr[1])) == eval('' + document.getElementById('mystime').innerHTML.split(':')[1])) {  insf=insf.replace(':' + arr[1] + ':', ':' + document.getElementById('mystime').innerHTML.split(':')[1] + ':');  arr[1]='zz';   } \";<br \/>\nprint \"      if (eval('' + arr[1].length) == 1) { insf=insf.replace(':' + arr[1] + ':', ':0' + arr[1] + ':');  } \";<br \/>\nprint \"      if (eval('' + arr[0].trim().length) == 1) { insf=insf.replace(arr[0].trim() + ':', '0' + arr[0].trim() + ':');  } \";<br \/>\nprint \"    } \";<br \/>\nprint \"   } \";<br \/>\nprint \"   return insf; \";<br \/>\nprint \" } \";<br \/>\nprint \" function loctime() { if (ls == '') { \";<br \/>\nprint \"   qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   ls=zeroize(('' + d.toLocaleString()).replace(',','')) + ' &lt;a onclick=alert(qwr); style=cursor:pointer;text-decoration:underline;&gt;GMT' + d.toString().split(' GMT')[1] + '&lt;\/a&gt;'; } if (!document.getElementById('mytime')) { setTimeout(loctime,1000); } else { \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); } \";<br \/>\nprint \" } \";<br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=setTimeout(loctime,1000);&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;Hello $first_name $last_name &lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;&lt;h4&gt;\";<br \/>\n<br \/>\n<font color=blue>if ($blogp == \"\") {<br \/>\n $blogp = $first_name;<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n}<br \/>\n<br \/>\nif ($blogp != \"\") {<br \/>\n $oneletter = substr( $blogp, 0, 1 );<br \/>\n<br \/>\n if ((ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) || ord($oneletter) == 40 ){<br \/>\n  my ($oneurl) = split \/,\/, $blogp;<br \/>\n<br \/>\n  if ($oneurl == $blogp) {<br \/>\n   $oneletter = substr( $blogp, 0, 1 );<br \/>\n  } else {<br \/>\n   if (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")) {<br \/>\n     $oneletter = \"1\";<br \/>\n     $blogp = \"( $blogp )\";<br \/>\n   } else {<br \/>\n     $oneletter = \"2\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n }<br \/>\n} <\/font><br \/>\n<br \/>\nif (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")){<br \/>\n # \/*** mysql hostname ***\/<br \/>\n $hostname = 'dbhost';<br \/>\n<br \/>\n # \/*** mysql username ***\/<br \/>\n $username = 'username';<br \/>\n<br \/>\n # \/*** mysql ***\/<br \/>\n $password = 'password';<br \/>\n<br \/>\n $dbname = 'dbname';<br \/>\n<br \/>\n $tname = 'table_name';<br \/>\n $hostname = \"DBI:mysql:$dbname:$hostname\";<br \/>\n<br \/>\n $dbh = DBI-&gt;connect($hostname, $username, $password);<br \/>\n<br \/>\n<font color=blue> my ($oneaurl) = split \/,\/, $blogp;<br \/>\n if (index($blogp, ',') &lt;= 0) {<br \/>\n   $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID=?\");<br \/>\n } else {<br \/>\n   if (ord($oneletter) != 40) {<br \/>\n     $blogp = \"($blogp)\";<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   } else {<br \/>\n     $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content, ID FROM $tname WHERE ID in $blogp\");<br \/>\n     $blogp = \"\";<br \/>\n   }<br \/>\n }<br \/>\n<br \/>\n if ($blogp == \"\") {<br \/>\n  $sth-&gt;execute();<br \/>\n } else {<\/font><br \/>\n  $sth-&gt;execute( $blogp );<br \/>\n <font color=blue>}<br \/>\n<br \/>\n $exc = 0;<br \/>\n $coln = \"A\";<br \/>\n $rown = 6;<br \/>\n $alinkis = \"\";<br \/>\n my $workbook = 0; # Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<\/font><br \/>\n<br \/>\n while (($tt, $cont<font color=blue>, $iid<\/font>) = $sth-&gt;fetchrow_array()) {<br \/>\n  <font color=blue>my ($junk, $imageu) = split \/ src=\"\/, $cont;<br \/>\n  my ($imageurl) = split \/\"\/, $imageu;<br \/>\n  my ($junk, $cutto) = split \/ href=\"\/, $cont;<br \/>\n  my ($cuttothechase) = split \/\"\/, $cutto;<br \/>\n  if ($exc == 0) {<br \/>\n    $exc = 1;<br \/>\n    # Create a new Excel workbook<br \/>\n    $workbook = Spreadsheet::WriteExcel-&gt;new('..\/perl.xls');<br \/>\n<br \/>\n    # Add a worksheet<br \/>\n    $worksheet = $workbook-&gt;add_worksheet();<br \/>\n<br \/>\n    #  Add and define a format<br \/>\n    $format = $workbook-&gt;add_format(); # Add a format<br \/>\n    $format-&gt;set_bold();<br \/>\n    $format-&gt;set_color('red');<br \/>\n    $format-&gt;set_align('center');<br \/>\n<br \/>\n    # Write a formatted and unformatted string, row and column notation.<br \/>\n    $col = $row = 0;<br \/>\n    $worksheet-&gt;write($row, $col, \"$first_name $last_name\", $format);<br \/>\n    # $worksheet-&gt;write(1,    $col, 'Hi Excel!');<br \/>\n<br \/>\n    # Write a number and a formula using A1 notation<br \/>\n    $worksheet-&gt;write(\"${coln}3\", \"$tt\");<br \/>\n    $worksheet-&gt;write(\"${coln}4\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\");<br \/>\n    $worksheet-&gt;write(\"${coln}5\", \"$cuttothechase\");<br \/>\n    $worksheet-&gt;write(\"${coln}6\", \"$imageurl\");<br \/>\n    $alinkis = \"&lt;a download=perl.xls href='\/\/www.rjmprogramming.com.au\/perl.xls' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n<\/font>    print \"&lt;details id=myd&gt;&lt;summary id=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  <font color=blue>} else {<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$tt\");<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid\");<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$cuttothechase\");<br \/>\n    $rown += 1;<br \/>\n    $worksheet-&gt;write(\"${coln}${rown}\", \"$imageurl\");<br \/>\n    $alinkis = \"&lt;a download=perl.xls href='\/\/www.rjmprogramming.com.au\/perl.xls' title='Download Excel spreadsheet'&gt;&amp;#128196;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$cuttothechase title='Cut to the chase'&gt;&amp;#127939;&lt;\/a&gt;&amp;nbsp;&amp;nbsp;&lt;a target=_blank href=$imageurl title='Image URL'&gt;&amp;#128444;&lt;\/a&gt;\";<br \/>\n    print \"&lt;details class=myd&gt;&lt;summary class=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$iid'&gt;$tt&lt;\/a&gt;&amp;nbsp;&amp;nbsp;$alinkis&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  }<\/font><br \/>\n  # print \"@row\\n\";<br \/>\n }<br \/>\n # }<br \/>\n}<br \/>\n<br \/>\nprint \"&lt;\/h4&gt;&lt;br&gt;&lt;br&gt;&lt;iframe id=myif src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<br \/>\n<\/code><\/p>\n<p> &#8230; creating optionally downloadable Excel spreadsheet documents reflecting user selections, in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.cgi--GETME\">the changed Perl<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi--GETME\">hello_get.cgi<\/a> code supervised by (and working with) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.html--GETME\">the changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html--GETME\">hello_get.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\" title=\"Click picture\">web application<\/a>, where, as of today, the dropdown for WordPress Blog Posting selection accepts multiple selections &#8230;<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_excels.jpg\"><\/img><\/p>\n<p> &#8230; with &#8230;<\/p>\n<ul>\n<li>First and Last Name &#8230; in webpage and spreadsheet<\/li>\n<li>Local and Server timestamps &#8230; in webpage<\/li>\n<li>Blog Posting link(s) &#8230; in webpage and spreadsheet<\/li>\n<li>Download Spreadsheet (total synopsis) download link(s) &#8230; in webpage<\/li>\n<li>Cut to the Chase (ie. the action item of a blog posting) link(s) &#8230; in webpage and spreadsheet<\/li>\n<li>Image URL (ie. the topmost image of a blog posting) link(s) &#8230; in webpage and spreadsheet<\/li>\n<\/ul>\n<p> &#8230; data items featuring.<\/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\/perl-cgi-spreadsheet-module-tutorial\/'>Perl CGI Spreadsheet Module Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgidbimt'>Previous relevant <a target=_blank title='Perl CGI DBI Module Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-dbi-module-tutorial\/'>Perl CGI DBI Module Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI DBI Module Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/hello_get_dbi.jpg\" title=\"Perl CGI DBI Module Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI DBI Module Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Perl CGI DateTime Module Primer Tutorial' href='#pcgidtmpt'>Perl CGI DateTime Module Primer Tutorial<\/a>&#8216;s &#8230;<\/p>\n<ul>\n<li>use of Perl module DateTime &#8230; today, we try out &#8230;<\/li>\n<li>use of Perl module <a target=_blank href='https:\/\/metacpan.org\/pod\/DBI' title='Perl module DBI information'>DBI<\/a><\/li>\n<\/ul>\n<p> &#8230; to facilitate the connection and use of database functionalities, in our case MySql, as per <font color=blue>our changed<\/font> Perl code to read off our WordPress blog MySql database table fields &#8230;<\/p>\n<ol>\n<li>post_title<\/li>\n<li>post_content<\/li>\n<\/ol>\n<p> &#8230; fields describing WordPress blog &#8220;Posting Title&#8221; and &#8220;Posting HTML Content&#8221; respectively, <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\n<font color=blue>use DBI;<br \/>\nuse DBD::mysql;<\/font><br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n}<br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n<font color=blue>$blogp  = $FORM{blogp};<\/font><br \/>\n$oneletter = substr( $first_name, 0, 1 );<br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n <br \/> <br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n <br \/> <br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n <br \/> <br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n <br \/> <br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n <br \/> <br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n <br \/> <br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n <br \/> <br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n <br \/> <br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/> <br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\n$tt = \"\";<br \/>\n$cont = \"\";<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" var ls='', ns='', qwr=''; \";<br \/>\nprint \" function zeroize(iinsf) { var insf=iinsf; var sep='\/', i=0; while (insf.substring(i).substring(0,1) &gt;= '0' && insf.substring(i).substring(0,1) &lt;= '9') { i++; } sep=insf.substring(i).substring(0,1); \";<br \/>\nprint \"   var arr=insf.split(sep); \";<br \/>\nprint \"   if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"    if (eval('' + arr[1].length) == 1) { insf=insf.replace(sep + arr[1] + sep, sep + '0' + arr[1] + sep);  } \";<br \/>\nprint \"    if (eval('' + arr[0].length) == 1) { insf='0' + insf;  } \";<br \/>\nprint \"    arr=insf.split(' ')[1].split(':'); \";<br \/>\nprint \"    if (eval('' + arr.length) &gt;= 3) { \";<br \/>\nprint \"      if (insf.indexOf(' pm') != -1) { insf=insf.replace(' ' + arr[0].trim() + ':', ' ' + eval(12 + eval('' + arr[0].trim())) + ':').replace(' pm', ' ');  arr=insf.split(' ')[1].split(':');   } \";<br \/>\nprint \"      if (eval(-1 + eval('' + arr[1])) == eval('' + document.getElementById('mystime').innerHTML.split(':')[1])) {  insf=insf.replace(':' + arr[1] + ':', ':' + document.getElementById('mystime').innerHTML.split(':')[1] + ':');  arr[1]='zz';   } \";<br \/>\nprint \"      if (eval('' + arr[1].length) == 1) { insf=insf.replace(':' + arr[1] + ':', ':0' + arr[1] + ':');  } \";<br \/>\nprint \"      if (eval('' + arr[0].trim().length) == 1) { insf=insf.replace(arr[0].trim() + ':', '0' + arr[0].trim() + ':');  } \";<br \/>\nprint \"    } \";<br \/>\nprint \"   } \";<br \/>\nprint \"   return insf; \";<br \/>\nprint \" } \";<br \/>\nprint \" function loctime() { if (ls == '') { \";<br \/>\nprint \"   qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   ls=zeroize(('' + d.toLocaleString()).replace(',','')) + ' &lt;a onclick=alert(qwr); style=cursor:pointer;text-decoration:underline;&gt;GMT' + d.toString().split(' GMT')[1] + '&lt;\/a&gt;'; } if (!document.getElementById('mytime')) { setTimeout(loctime,1000); } else { \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); } \";<br \/>\nprint \" } \";<br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=setTimeout(loctime,1000);&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;Hello $first_name $last_name &lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;&lt;h4&gt;\";<br \/>\n<br \/>\n<font color=blue>if ($blogp == \"\") { $blogp = $first_name; } else { $oneletter = substr( $blogp, 0, 1 ); }<\/font><br \/>\n<br \/>\n<font color=blue>if (ord($oneletter) &gt;= ord(\"0\") && ord($oneletter) &lt;= ord(\"9\")){<br \/>\n # \/*** mysql hostname ***\/<br \/>\n $hostname = 'dbhost';<br \/>\n<br \/>\n # \/*** mysql username ***\/<br \/>\n $username = 'username';<br \/>\n<br \/>\n # \/*** mysql ***\/<br \/>\n $password = 'password';<br \/>\n<br \/>\n $dbname = 'dbname';<br \/>\n<br \/>\n $tname = 'table_name';<br \/>\n $hostname = \"DBI:mysql:$dbname:$hostname\";<br \/>\n<br \/>\n $dbh = DBI-&gt;connect($hostname, $username, $password);<br \/>\n<br \/>\n $sth = $dbh-&gt;prepare(\"SELECT post_title, post_content FROM $tname WHERE ID=?\");<br \/>\n <br \/>\n $sth-&gt;execute( $blogp );<br \/>\n <br \/>\n #while ( @row = $sth-&gt;fetchrow_array ) {<br \/>\n while (($tt, $cont) = $sth-&gt;fetchrow_array()) {<br \/>\n  print \"&lt;details id=myd&gt;&lt;summary id=mys&gt;&lt;h1&gt;&lt;a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/?p=$blogp'&gt;$tt&lt;\/a&gt;&lt;\/h1&gt;&lt;\/summary&gt;$cont&lt;\/details&gt;\\n\";<br \/>\n  # print \"@row\\n\";<br \/>\n }<br \/>\n # }<br \/>\n}<\/font><br \/>\n<br \/>\nprint \"&lt;\/h4&gt;&lt;br&gt;&lt;br&gt;&lt;iframe id=myif src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<br \/>\n<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.cgi-GETME\">the changed Perl<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi-GETME\">hello_get.cgi<\/a> code supervised by (and working with) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/hello_get.html-GETME\">the changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html-GETME\">hello_get.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\" title=\"Click picture\">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\/perl-cgi-dbi-module-tutorial\/'>Perl CGI DBI Module Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgidtmpt'>Previous relevant <a target=_blank title='Perl CGI DateTime Module Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-datetime-module-primer-tutorial\/'>Perl CGI DateTime Module 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\/cgi-bin\/hello_get.cgi\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI DateTime Module Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/perl_datetime.jpg\" title=\"Perl CGI DateTime Module Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI DateTime Module Primer Tutorial<\/p><\/div>\n<p>Do you remember with <a title='Perl CGI Modes of Use Primer Tutorial' href='#pcgimupt'>Perl CGI Modes of Use Primer Tutorial<\/a> how we used the Perl programming language as an alternative server language player up at the RJM Programming website?<\/p>\n<p>Well, in any case, today, we explore some Perl modules which can make that code be more useful to us.  As for how we interface to it, we&#8217;ve written a very simple HTML <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html_GETME\">hello_get.html<\/a> interfacer we&#8217;d like to thank <a target=_blank title='https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm' href='https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm'>https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm<\/a> for &#8230;<\/p>\n<p><code><br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;hello_get ... Thanks to https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm and https:\/\/perlmaven.com\/most-popular-perl-modules and https:\/\/www.freecodecamp.org\/news\/how-to-format-dates-in-javascript\/&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;h1&gt;hello_get.html HTML calls on hello_get.cgi Perl&lt;\/h1&gt;<br \/>\n&lt;h3&gt;RJM Programming - February, 2023&lt;\/h3&gt;<br \/>\n&lt;h3&gt;Thanks to <a target=_blank title='https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm' href='https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm'>https:\/\/www.tutorialspoint.com\/perl\/perl_cgi.htm<\/a> and <a target=_blank title='https:\/\/perlmaven.com\/most-popular-perl-modules' href='https:\/\/perlmaven.com\/most-popular-perl-modules'>https:\/\/perlmaven.com\/most-popular-perl-modules<\/a> and <a target=_blank title='https:\/\/www.freecodecamp.org\/news\/how-to-format-dates-in-javascript\/' href='https:\/\/www.freecodecamp.org\/news\/how-to-format-dates-in-javascript\/'>https:\/\/www.freecodecamp.org\/news\/how-to-format-dates-in-javascript\/<\/a>&lt;\/h3&gt;<br \/>\n&lt;br&gt;&lt;br&gt;<br \/>\n&lt;FORM action = \"\/cgi-bin\/hello_get.cgi\" method = \"GET\"&gt;<br \/>\n<br \/>\n   First Name: &lt;input type = \"text\" name = \"first_name\"&gt;  &lt;br&gt;<br \/>\n<br \/>\n   Last Name: &lt;input type = \"text\" name = \"last_name\"&gt;<br \/>\n   &lt;input type = \"submit\" value = \"Submit\"&gt;<br \/>\n&lt;\/FORM&gt;<br \/>\n<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; where this webpage&#8217;s HTML form&#8217;s action points to some Perl <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.cgi_GETME\">hello_get.cgi<\/a> (up at the Apache web server, in a cgi-bin folder and with the executable permission bit set) code using the <a target=_blank title='Perl DateTime module' href='https:\/\/metacpan.org\/pod\/DateTime'>DateTime<\/a> module, and showing the user client local timezone current time compared to this RJM Programming&#8217;s server timezone current time &#8230;<\/p>\n<p><code><br \/>\n#!\/usr\/bin\/perl<br \/>\n<br \/>\nuse DateTime;<br \/>\nuse DateTime::TimeZone;<br \/>\n<br \/>\nlocal ($buffer, @pairs, $pair, $name, $value, %FORM);<br \/>\n# Read in text<br \/>\n$ENV{'REQUEST_METHOD'} =~ tr\/a-z\/A-Z\/;<br \/>\n<br \/>\nif ($ENV{'REQUEST_METHOD'} eq \"GET\") {<br \/>\n   $buffer = $ENV{'QUERY_STRING'};<br \/>\n}<br \/>\n<br \/>\n# Split information into name\/value pairs<br \/>\n@pairs = split(\/&\/, $buffer);<br \/>\n<br \/>\nforeach $pair (@pairs) {<br \/>\n   ($name, $value) = split(\/=\/, $pair);<br \/>\n   $value =~ tr\/+\/ \/;<br \/>\n   $value =~ s\/%(..)\/pack(\"C\", hex($1))\/eg;<br \/>\n   $FORM{$name} = $value;<br \/>\n}<br \/>\n<br \/>\n$first_name = $FORM{first_name};<br \/>\n$last_name  = $FORM{last_name};<br \/>\n<br \/>\n$dt = DateTime-&gt;now;    # same as ( epoch =&gt; time )<br \/>\n<br \/>\n$dttz = DateTime::TimeZone-&gt;new( name =&gt; 'local' )-&gt;name();<br \/>\n<br \/>\n$dt-&gt;set_time_zone( $dttz );<br \/>\n<br \/>\n$year  = $dt-&gt;year;<br \/>\n$month = $dt-&gt;month;        # 1-12<br \/>\n<br \/>\n$day = $dt-&gt;day;            # 1-31<br \/>\n<br \/>\n$dow = $dt-&gt;day_of_week;    # 1-7 (Monday is 1)<br \/>\n<br \/>\n$hour   = $dt-&gt;hour;        # 0-23<br \/>\n$minute = $dt-&gt;minute;      # 0-59<br \/>\n<br \/>\n$second = $dt-&gt;second;      # 0-61 (leap seconds!)<br \/>\n<br \/>\n$doy = $dt-&gt;day_of_year;    # 1-366 (leap years)<br \/>\n<br \/>\n$doq = $dt-&gt;day_of_quarter; # 1..<br \/>\n<br \/>\n$qtr = $dt-&gt;quarter;        # 1-4<br \/>\n<br \/>\n$dmy = $dt-&gt;dmy('\/');    # 06\/12\/2002<br \/>\n<br \/>\n$hms = $dt-&gt;hms;         # 14:02:29<br \/>\n<br \/>\nprint \"Content-type:text\/html\\r\\n\\r\\n\";<br \/>\nprint \"&lt;html&gt;\";<br \/>\nprint \"&lt;head&gt;\";<br \/>\nprint \"&lt;title&gt;Hello - Second CGI Program&lt;\/title&gt;\";<br \/>\nprint \"&lt;script type=text\/javascript&gt;\";<br \/>\nprint \" function loctime() { \";<br \/>\nprint \"   var qwr='' + Intl.DateTimeFormat().resolvedOptions().timeZone; \";<br \/>\nprint \"   var d = new Date(); \";<br \/>\nprint \"   d.toLocaleString('en-US', { timeZone: qwr }); \";<br \/>\nprint \"   var ns=document.getElementById('mystime').innerHTML.split(':')[2].split(' ')[0]; \";<br \/>\nprint \"   var ls=('' + d.toLocaleString()).replace(',','') + ' GMT' + d.toString().split(' GMT')[1]; \";<br \/>\nprint \"   document.getElementById('mytime').innerHTML=ls.replace(':' + ls.split(':')[2].split(' ')[0] + ' ', ':' + ns + ' '); \";<br \/>\nprint \" } \";<br \/>\nprint \"&lt;\/script&gt;\";<br \/>\nprint \"&lt;\/head&gt;\";<br \/>\nprint \"&lt;body onload=loctime();&gt;\";<br \/>\nprint \"&lt;h2 style='font-family:Courier New;'&gt;Hello $first_name $last_name &lt;br&gt;&amp;nbsp;Local: &lt;span id=mytime&gt;&lt;\/span&gt;&lt;br&gt;Server: &lt;span id=mystime&gt;$dmy $hms&lt;\/span&gt; $dttz &lt;\/h2&gt;\";<br \/>\nprint \"&lt;br&gt;&lt;br&gt;&lt;iframe src='\/hello_get.html' style='width:100%; height:1500px;'&gt;&lt;\/iframe&gt;&lt;\/body&gt;\";<br \/>\nprint \"&lt;\/html&gt;\";<br \/>\n<br \/>\n1;<br \/>\n<\/code><\/p>\n<p>The use of the HTML iframe in the Perl (writing HTML) code means that either &#8230;<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/cgi-bin\/hello_get.cgi\">hello_get.cgi<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/hello_get.html\">hello_get.html<\/a><\/li>\n<\/ul>\n<p> &#8230; can be used to get the &#8220;Perl ball&#8221; rolling.<\/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\/new-perl-cgi-modes-of-use-primer-tutorial\/'>New Perl CGI Modes of Use Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pcgimupt'>Previous relevant <a target=_blank title='Perl CGI Modes of Use Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-modes-of-use-primer-tutorial\/'>Perl CGI Modes of Use 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\/cgi-bin\/readfile.cgi?file=..\/HTMLCSS\/india_jigsaw.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Perl CGI Modes of Use Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Perl\/perl_mode.jpg\" title=\"Perl CGI Modes of Use Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Perl CGI Modes of Use Primer Tutorial<\/p><\/div>\n<p>A little while back we revisited the <i>&#8220;PHP Modes of Use&#8221;<\/i> discussion last talked about with <a target=_blank href='#pmuftt' title='PHP Modes of Use File Traverse Tutorial'>PHP Modes of Use File Traverse Tutorial<\/a> as shown below.  We&#8217;re revisiting today to show you that it doesn&#8217;t have to be only your principal server language of choice involved in this kind of thinking, but you can also talk in terms of your chosen <a target=_blank title='Common Gateway Interface information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Common_Gateway_Interface'>CGI<\/a> (Common Gateway Interface) language of choice, which happens to be Perl here at the www.rjmprogramming.com.au domain.  The other common partner of PHP as its CGI partner is Python.<\/p>\n<p>Do you recall the three modes of use we talk about?  Here they are below &#8230;<\/p>\n<ol>\n<li>web browsing &#8230; via use of a GET arguments URL<\/li>\n<li style='color:brown;'>curl (from the command line &#8230; in our case Linux, but could be Windows too)<\/li>\n<li style='color:blue;'>command line (Perl) &#8230; use the $ARGV[] array variables<\/li>\n<\/ol>\n<p>&#8230; all good? &#8230; okay, we keep those three, but with the <a target=_blank title='cURL information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/CURL'><i>curl<\/i><\/a> option would also like to show that it can be subdivided into two submodes, namely &#8230;<\/p>\n<ul>\n<li style='color:brown;'>GET mode (via URL)<\/li>\n<li style='color:brown;'>POST mode (via <i>simulated<\/i> FORM (results))<\/li>\n<\/ul>\n<p>&#8230; which is probably true of non-CGI scenarios as well, but is particularly pertinent to discussions of CGI because we generally think of the CGI language as the one POSTed to from an HTML form, but, here, hopefully, we extend your mode of thinking to the thought that <i>curl<\/i> can handle you sending in the GET mode (though that is awkward with more than one GET argument and using the <i>&amp;<\/i> syntax) or via the use of various non-default switches such as <i>-d &#8220;name1=value1 name2=value2 blah3=blahval3&#8221;<\/i> to simulate a (form) POST &#8230; pretty powerful, huh &#8230; enabling what you may have only initially thought of as a piece of code to process an HTML form, into the additional possibility of a standalone piece of code that <a target=_blank title='Linux curl command line ideas' href='http:\/\/curl.haxx.se\/docs\/manpage.html'><i>curl<\/i><\/a> can control independent of a web browser, as required.  Please note, though, for those of us who want to &#8220;do their heads in&#8221; for <a target=_blank title='Onion of the 4th Dimension' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=4th+dimension'>&#8220;Onion of the 4th Dimension&#8221;<\/a> possibilities, the PHP <a target=_blank title='PHP exec command' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> command, or something like it could be used with options 3 and\/or 2a and\/or 2b to create other possibilities.<\/p>\n<p>Anyway, have a look (closely) at our tutorial <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Perl\/perl_mode.jpg\" title=\"Show picture\">picture<\/a> and our web browser mode <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/cgi-bin\/readfile.cgi?file=..\/HTMLCSS\/india_jigsaw.html\" title=\"Click picture\">live run<\/a> &#8230;<\/p>\n<p>&#8230; and have a look at the associated Perl CGI programming source code to read an *.htm* or *.txt file in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Perl\/readfile.cgi_GETME\" title=\"readfile.cgi\">readfile.cgi<\/a><\/p>\n<p>Of great help for this tutorial was <i>Perl and CGI for the World Wide Web<\/i> by Elizabeth Castro page 195 (in particular) and <a target=_blank title='cURL command line help ... thanks' href='http:\/\/superuser.com\/questions\/149329\/what-is-the-curl-command-line-syntax-to-do-a-post-request'>What is the cURL command-line syntax to do a POST request?<\/a> (for help regarding curl command line switches for POSTed data) &#8230; thanks.<\/p>\n<p>Will leave you with a recall of the discussions regarding PHP (our primary non-CGI server language of choice at www.rjmprogramming.com.au) below &#8230;<\/p>\n<hr \/>\n<p id='pmuftt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10515' title='PHP Modes of Use File Traverse Tutorial'>PHP Modes of Use File Traverse 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\/doviadir.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP Modes of Use File Traverse Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/FileTraverse.jpg\" title=\"PHP Modes of Use File Traverse Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP Modes of Use File Traverse Tutorial<\/p><\/div>\n<p>It&#8217;s been a while since we last visited the <i>&#8220;PHP Modes of Use&#8221;<\/i> discussion last talked about with <a target=_blank href='#cspmoupt' title='C Supervised PHP Modes of Use Primer Tutorial'>C Supervised PHP Modes of Use Primer Tutorial<\/a> as shown below.  We&#8217;re revisiting today to show you a practical application of writing PHP for those three modes of use &#8230; namely &#8230;<\/p>\n<ol>\n<li>web browsing &#8230; use a form, then post, and then access the $_POST[] variables<\/li>\n<li>curl &#8230; note how only the one $_GET[] variable is available because of trouble using &amp; on Linux command line (use of @ is a local idea &#8230; there would be many other ideas that will work)<\/li>\n<li>command line PHP &#8230; use the $argv array variables<\/li>\n<\/ol>\n<p>&#8230; so have a look at the PHP programming source code to traverse a directory&#8217;s files in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/doviadir.php_GETME\" title=\"doviadir.php\">doviadir.php<\/a> with the live &#8220;web browsing&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/doviadir.php\" title=\"Live Run\">live run<\/a>.<\/p>\n<p>Will leave you with a recall of the discussion below &#8230;<\/p>\n<p>Recently, with our tutorial, <a target=_blank href=\"#pmoupt\" title='PHP Modes of Use Primer Tutorial'>PHP Modes of Use Primer Tutorial<\/a> as shown below, we talked about three modes of use or access for the use of PHP and today we encase all that thinking in a Mac OS X command line C program supervision framework.  You&#8217;d expect that this is possible in a command line or Intranet environment where Linux or unix (or, for that matter, Windows command line &#8230; though the code here won&#8217;t work for this one) where C can have such a close relationship to the Linux or unix kernel, that it would be able the &#8220;run the whole show&#8221; as well as the shell commands themselves can.  Today&#8217;s C has been compiled using the Xcode IDE for use with a Mac OS X operating system.<\/p>\n<p>So that&#8217;s the supervisor above.  Read, again, about &#8220;the supervised&#8221;, below &#8230;<\/p>\n<p><a target=_blank title='PHP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/PHP'>PHP<\/a> is a very flexible programming language.  It is probably best known as a server-side language called by a web browser using the http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;).  Let&#8217;s list three modes of use of PHP below:<\/p>\n<ol>\n<li>Via http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;) in an <a target=_blank title='Internet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Internet'>Internet<\/a> mode of use (eg: http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) in address bar of a web browser<\/li>\n<li style='color:brown;'>Via <a target=_blank title='PHP information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Curl_%28programming_language%29'>curl<\/a> in an Internet mode of use (eg. curl http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) at Linux or unix or Windows command line to default output (and you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<li style='color:blue;'>Via command line PHP in Linux or unix or Windows command line in a command or <a target=_blank title='Intranet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Intranet'>Intranet<\/a> mode of use (eg. php in_tra_ter_net.php SERVER_NAME=localhost) at a Linux or unix or Windows command line (where the PHP code has been placed, in our example (ie. it is not a URL, but is a file specification of your (Intranet) server)) to default output (or you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<\/ol>\n<p>Does it matter how the PHP is accessed?  Well, yes, it does &#8230; sometimes, but not if the code is restricted to a particular mode of usage (but part of what this tutorial is about is to get across how flexible and powerful PHP can be).  With the last option above, lots of <a target=_blank title='PHP $_SERVER[] variables' href='http:\/\/au2.php.net\/reserved.variables.server.php'>$_SERVER[]<\/a> variables are undefined, for example.<\/p>\n<ol>\n<li>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is defined, unlike with curl usage (this seems to be a possibility as a way to detect curl usage).  Most $_SERVER[] variables are defined, but $argv[] array is not.<\/li>\n<li style='color:brown;'>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is undefined, but a lot of the rest of $_SERVER[] variables are as above.<\/li>\n<li style='color:blue;'>Lots of $_SERVER[] variables are undefined, with the exception of $_SERVER[&#8216;SCRIPT_FILENAME&#8217;] which may help you with Intranet application usage.  You cannot enter $_GET[] arguments (on the command line (ie. you will get a syntax error if you try)) so these are undefined, but $argv[] array can be used in that awkward way shown, so that $argv[1] can be arranged to be a lot like $_SERVER[&#8216;QUERY_STRING&#8217;] (ie. the bits after ? in a URL).<\/li>\n<\/ol>\n<p>So, maybe you have the one mode of use in mind, but you need to think a bit to support all the modes of use, if they are all to have a role with the PHP you write, because, despite these differences it is good to use $_SERVER[] and $_GET[] and $_POST[] and $_SESSION[] and $argv[] and whatever else in terms of variable information PHP offers in terms of attempting to write generic code.<\/p>\n<p>Hope you get something out of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/C\/http_vs_curl_vs_php_command_line.png\" title='Click picture'>discussion<\/a> of our Mac OS X MAMP Apache local Web server environment example (hence the <i>http:\/\/localhost:8888\/<\/i> you see in the URLs above), but please bear in mind that there would be other modes of use once you think of other client HTML element ways of accessing PHP (all a lot like the &#8220;web browsing&#8221; of above) or other possibilities within PHP code itself via PHP commands <a target=_blank title='PHP exec' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> and <a target=_blank title='PHP file_get_contents' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'><i>file_get_contents<\/i><\/a> the latter of which can be very useful during Intranet usage where there is no <i>curl<\/i> available, perhaps.  Instead of curl you could use <a target=_blank title='wget' href='http:\/\/www.gnu.org\/s\/wget\/'>wget<\/a> as another approach.<\/p>\n<p>You may want to see a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php\" title='Live Run'>live run (web browsing)<\/a> here at the rjmprogramming.com.au domain of the supervised PHP (alone), or you may want to download the supervised PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php_GETME\" title='in_tra_ter_net.php'>in_tra_ter_net.php<\/a>  or you may want to download the supervisory <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/C\/main.c_GETME\" title='main.c'>main.c<\/a> as you require.<\/p>\n<p>A &#8220;stop press&#8221; to do with code above is that since the &#8220;queueing up&#8221; of this blog post a new posting is relevant, the recent <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9586\">PHP Modes of Use Follow Up Tutorial<\/a>, and that to incorporate this posting&#8217;s improvements over <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9356\">PHP Modes of Use Primer Tutorial<\/a>, you&#8217;d want to substitute all mentions of  <i>in_tra_ter_net<\/i> with <i>more_in_tra_ter_net<\/i> in the code of main.c as above.   The relevant changed PHP source code is <a target=_blank title='more_in_tra_ter_net.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/more_in_tra_ter_net.php_GETME'>more_in_tra_ter_net.php<\/a><\/p>\n<hr \/>\n<p id='cspmoupt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9385' title='C Supervised PHP Modes of Use Primer Tutorial'>C Supervised PHP Modes of Use 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\/PHP\/C\/http_vs_curl_vs_php_command_line.png\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"C Supervised PHP Modes of Use Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/C\/http_vs_curl_vs_php_command_line.png\" title=\"PHP Modes of Use Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">C Supervised PHP Modes of Use Primer Tutorial<\/p><\/div>\n<p>Recently, with our tutorial, <a target=_blank href=\"#pmoupt\" title='PHP Modes of Use Primer Tutorial'>PHP Modes of Use Primer Tutorial<\/a> as shown below, we talked about three modes of use or access for the use of PHP and today we encase all that thinking in a Mac OS X command line C program supervision framework.  You&#8217;d expect that this is possible in a command line or Intranet environment where Linux or unix (or, for that matter, Windows command line &#8230; though the code here won&#8217;t work for this one) where C can have such a close relationship to the Linux or unix kernel, that it would be able the &#8220;run the whole show&#8221; as well as the shell commands themselves can.  Today&#8217;s C has been compiled using the Xcode IDE for use with a Mac OS X operating system.<\/p>\n<p>So that&#8217;s the supervisor above.  Read, again, about &#8220;the supervised&#8221;, below &#8230;<\/p>\n<p><a target=_blank title='PHP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/PHP'>PHP<\/a> is a very flexible programming language.  It is probably best known as a server-side language called by a web browser using the http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;).  Let&#8217;s list three modes of use of PHP below:<\/p>\n<ol>\n<li>Via http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;) in an <a target=_blank title='Internet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Internet'>Internet<\/a> mode of use (eg: http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) in address bar of a web browser<\/li>\n<li style='color:blue;'>Via <a target=_blank title='PHP information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Curl_%28programming_language%29'>curl<\/a> in an Internet mode of use (eg. curl http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) at Linux or unix or Windows command line to default output (and you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<li style='color:brown;'>Via command line PHP in Linux or unix or Windows command line in a command or <a target=_blank title='Intranet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Intranet'>Intranet<\/a> mode of use (eg. php in_tra_ter_net.php SERVER_NAME=localhost) at a Linux or unix or Windows command line (where the PHP code has been placed, in our example (ie. it is not a URL, but is a file specification of your (Intranet) server)) to default output (or you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<\/ol>\n<p>Does it matter how the PHP is accessed?  Well, yes, it does &#8230; sometimes, but not if the code is restricted to a particular mode of usage (but part of what this tutorial is about is to get across how flexible and powerful PHP can be).  With the last option above, lots of <a target=_blank title='PHP $_SERVER[] variables' href='http:\/\/au2.php.net\/reserved.variables.server.php'>$_SERVER[]<\/a> variables are undefined, for example.<\/p>\n<ol>\n<li>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is defined, unlike with curl usage (this seems to be a possibility as a way to detect curl usage).  Most $_SERVER[] variables are defined, but $argv[] array is not.<\/li>\n<li style='color:blue;'>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is undefined, but a lot of the rest of $_SERVER[] variables are as above.<\/li>\n<li style='color:brown;'>Lots of $_SERVER[] variables are undefined, with the exception of $_SERVER[&#8216;SCRIPT_FILENAME&#8217;] which may help you with Intranet application usage.  You cannot enter $_GET[] arguments (on the command line (ie. you will get a syntax error if you try)) so these are undefined, but $argv[] array can be used in that awkward way shown, so that $argv[1] can be arranged to be a lot like $_SERVER[&#8216;QUERY_STRING&#8217;] (ie. the bits after ? in a URL).<\/li>\n<\/ol>\n<p>So, maybe you have the one mode of use in mind, but you need to think a bit to support all the modes of use, if they are all to have a role with the PHP you write, because, despite these differences it is good to use $_SERVER[] and $_GET[] and $_POST[] and $_SESSION[] and $argv[] and whatever else in terms of variable information PHP offers in terms of attempting to write generic code.<\/p>\n<p>Hope you get something out of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/C\/http_vs_curl_vs_php_command_line.png\" title='Click picture'>discussion<\/a> of our Mac OS X MAMP Apache local Web server environment example (hence the <i>http:\/\/localhost:8888\/<\/i> you see in the URLs above), but please bear in mind that there would be other modes of use once you think of other client HTML element ways of accessing PHP (all a lot like the &#8220;web browsing&#8221; of above) or other possibilities within PHP code itself via PHP commands <a target=_blank title='PHP exec' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> and <a target=_blank title='PHP file_get_contents' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'><i>file_get_contents<\/i><\/a> the latter of which can be very useful during Intranet usage where there is no <i>curl<\/i> available, perhaps.  Instead of curl you could use <a target=_blank title='wget' href='http:\/\/www.gnu.org\/s\/wget\/'>wget<\/a> as another approach.<\/p>\n<p>You may want to see a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php\" title='Live Run'>live run (web browsing)<\/a> here at the rjmprogramming.com.au domain of the supervised PHP (alone), or you may want to download the supervised PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php_GETME\" title='in_tra_ter_net.php'>in_tra_ter_net.php<\/a>  or you may want to download the supervisory <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/C\/main.c_GETME\" title='main.c'>main.c<\/a> as you require.<\/p>\n<p>A &#8220;stop press&#8221; to do with code above is that since the &#8220;queueing up&#8221; of this blog post a new posting is relevant, the recent <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9586\">PHP Modes of Use Follow Up Tutorial<\/a>, and that to incorporate this posting&#8217;s improvements over <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9356\">PHP Modes of Use Primer Tutorial<\/a>, you&#8217;d want to substitute all mentions of  <i>in_tra_ter_net<\/i> with <i>more_in_tra_ter_net<\/i> in the code of main.c as above.   The relevant changed PHP source code is <a target=_blank title='more_in_tra_ter_net.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/more_in_tra_ter_net.php_GETME'>more_in_tra_ter_net.php<\/a><\/p>\n<hr \/>\n<p id='pmoupt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9356' title='PHP Modes of Use Primer Tutorial'>PHP Modes of Use 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\/PHP\/http_vs_curl_vs_php_command_line.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP Modes of Use Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/http_vs_curl_vs_php_command_line.jpg\" title=\"PHP Modes of Use Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP Modes of Use Primer Tutorial<\/p><\/div>\n<p><a target=_blank title='PHP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/PHP'>PHP<\/a> is a very flexible programming language.  It is probably best known as a server-side language called by a web browser using the http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;).  Let&#8217;s list three modes of use of PHP below:<\/p>\n<ol>\n<li>Via http transport layer (ie. web browsing, or &#8220;surfing the net&#8221;) in an <a target=_blank title='Internet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Internet'>Internet<\/a> mode of use (eg: http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) in address bar of a web browser<\/li>\n<li style='color:blue;'>Via <a target=_blank title='PHP information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Curl_%28programming_language%29'>curl<\/a> in an Internet mode of use (eg. curl http:\/\/localhost:8888\/in_tra_ter_net.php?SERVER_NAME=localhost) at Linux or unix or Windows command line to default output (and you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<li style='color:brown;'>Via command line PHP in Linux or unix or Windows command line in a command or <a target=_blank title='Intranet information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Intranet'>Intranet<\/a> mode of use (eg. php in_tra_ter_net.php SERVER_NAME=localhost) at a Linux or unix or Windows command line (where the PHP code has been placed, in our example (ie. it is not a URL, but is a file specification of your (Intranet) server)) to default output (or you can redirect as required via &gt; <i>outfile<\/i> or &gt;&gt; <i>outfile<\/i> or 2&gt; <i>errfile<\/i> or 2&gt;&gt; <i>errfile<\/i>)<\/li>\n<\/ol>\n<p>Does it matter how the PHP is accessed?  Well, yes, it does &#8230; sometimes, but not if the code is restricted to a particular mode of usage (but part of what this tutorial is about is to get across how flexible and powerful PHP can be).  With the last option above, lots of <a target=_blank title='PHP $_SERVER[] variables' href='http:\/\/au2.php.net\/reserved.variables.server.php'>$_SERVER[]<\/a> variables are undefined, for example.<\/p>\n<ol>\n<li>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is defined, unlike with curl usage (this seems to be a possibility as a way to detect curl usage).  Most $_SERVER[] variables are defined, but $argv[] array is not.<\/li>\n<li style='color:blue;'>$_SERVER[&#8216;HTTP_COOKIE&#8217;] is undefined, but a lot of the rest of $_SERVER[] variables are as above.<\/li>\n<li style='color:brown;'>Lots of $_SERVER[] variables are undefined, with the exception of $_SERVER[&#8216;SCRIPT_FILENAME&#8217;] which may help you with Intranet application usage.  You cannot enter $_GET[] arguments (on the command line (ie. you will get a syntax error if you try)) so these are undefined, but $argv[] array can be used in that awkward way shown, so that $argv[1] can be arranged to be a lot like $_SERVER[&#8216;QUERY_STRING&#8217;] (ie. the bits after ? in a URL).<\/li>\n<\/ol>\n<p>So, maybe you have the one mode of use in mind, but you need to think a bit to support all the modes of use, if they are all to have a role with the PHP you write, because, despite these differences it is good to use $_SERVER[] and $_GET[] and $_POST[] and $_SESSION[] and $argv[] and whatever else in terms of variable information PHP offers in terms of attempting to write generic code.<\/p>\n<p>Hope you get something out of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/http_vs_curl_vs_php_command_line.jpg\" title='Click picture'>discussion<\/a> of our Mac OS X MAMP Apache local Web server environment example (hence the <i>http:\/\/localhost:8888\/<\/i> you see in the URLs above), but please bear in mind that there would be other modes of use once you think of other client HTML element ways of accessing PHP (all a lot like the &#8220;web browsing&#8221; of above) or other possibilities within PHP code itself via PHP commands <a target=_blank title='PHP exec' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> and <a target=_blank title='PHP file_get_contents' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'><i>file_get_contents<\/i><\/a> the latter of which can be very useful during Intranet usage where there is no <i>curl<\/i> available, perhaps.  Instead of curl you could use <a target=_blank title='wget' href='http:\/\/www.gnu.org\/s\/wget\/'>wget<\/a> as another approach.<\/p>\n<p>You may want to see a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php\" title='Live Run'>live run (web browsing)<\/a> here at the rjmprogramming.com.au domain or you may want to download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/in_tra_ter_net.php_GETME\" title='in_tra_ter_net.php'>in_tra_ter_net.php<\/a> as you require.<\/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='#d9356' onclick='var dv=document.getElementById(\"d9356\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=PHP\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9356' 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='#d9385' onclick='var dv=document.getElementById(\"d9385\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Xcode\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9385' 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='#d10515' onclick='var dv=document.getElementById(\"d10515\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=curl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10515' 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='#d11171' onclick='var dv=document.getElementById(\"d11171\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=CGI\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11171' 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='#d58248' onclick='var dv=document.getElementById(\"d58248\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/perl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58248' 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='#d58255' onclick='var dv=document.getElementById(\"d58255\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/mysql\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58255' 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='#d58264' onclick='var dv=document.getElementById(\"d58264\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/spreadsheet\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58264' 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='#d58273' onclick='var dv=document.getElementById(\"d58273\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/sort\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58273' 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='#d58280' onclick='var dv=document.getElementById(\"d58280\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/url\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58280' 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='#d58287' onclick='var dv=document.getElementById(\"d58287\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/intranet\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58287' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve got a couple of changes onto yesterday&#8217;s Perl CGI URL Content Tutorial&#8216;s progress regarding our Perl CGI Modules explorations &#8230; base the navigation to Perl as HTML form method=POST rather than method=GET &#8230; allowing for larger data sets &#8230; &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/perl-cgi-intranet-audio-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":[2824,3028,85,113,196,4240,212,230,251,257,290,299,2974,301,302,4242,4241,2310,360,4243,403,3929,3103,452,576,2658,587,624,694,2178,1830,802,827,830,916,4021,970,997,2945,1063,1075,2350,1122,1173,2449,2013,1185,2902,2311,3350,2834,1693,1319,1345,1418],"class_list":["post-58287","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-absolute","tag-action","tag-apache","tag-audio","tag-cgi","tag-cgi-bin","tag-client","tag-column","tag-connect","tag-content","tag-data","tag-database-2","tag-database-table","tag-date","tag-datetime","tag-dbd","tag-dbi","tag-details","tag-download","tag-downloading","tag-excel","tag-executable","tag-field","tag-form","tag-html","tag-html-entity","tag-iframe","tag-intranet","tag-libreoffice","tag-macos","tag-method","tag-module","tag-mysql","tag-navigation","tag-perl","tag-permissions","tag-post","tag-programming","tag-relative","tag-reveal","tag-row","tag-say","tag-server","tag-sort","tag-sorting","tag-split","tag-spreadsheet","tag-srcdoc","tag-summary","tag-text-to-audio","tag-timestamp","tag-timezone","tag-tutorial","tag-url","tag-webpage"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58287"}],"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=58287"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58287\/revisions"}],"predecessor-version":[{"id":58295,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58287\/revisions\/58295"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}