{"id":44745,"date":"2022-10-14T03:01:51","date_gmt":"2022-10-13T17:01:51","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=44745"},"modified":"2022-10-17T17:49:31","modified_gmt":"2022-10-17T07:49:31","slug":"curl-multiple-urls-on-command-line-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/curl-multiple-urls-on-command-line-tutorial\/","title":{"rendered":"Curl Multiple URLs on Command Line Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/curl_more.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Curl Multiple URLs on Command Line Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/curl_more.jpg\" title=\"Curl Multiple URLs on Command Line Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Curl Multiple URLs on Command Line Tutorial<\/p><\/div>\n<p>Continuing on from yesterday&#8217;s <a title='Curl via PHP to CSV on Command Line Tutorial' href='#cphpcsvclt'>Curl via PHP to CSV on Command Line Tutorial<\/a> with more Linux or Mac OS X command line <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'>curl<\/a> brilliance, did you know that you can run several URLs from the one curl command line statement?<\/p>\n<p>Take a look at our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/curl_more.jpg\" title=\"Tutorial picture\">tutorial picture<\/a>&#8216;s scenario as a simple example of what is possible here with command line curl &#8230;<\/p>\n<p><code><br \/>\n$ echo \"The rain\" > page1.html<br \/>\n$ echo \"In Spain\" > page2.html<br \/>\n$ echo \"Falls mainly\" > page3.html<br \/>\n$ echo \"On the plain\" > page4.html<br \/>\n$ curl http:\/\/localhost:8888\/page[1-4].html 2> \/dev\/null | grep -v '-'<br \/>\nThe rain<br \/>\nIn Spain<br \/>\nFalls mainly<br \/>\nOn the plain<br \/>\n$<br \/>\n<\/code><\/p>\n<p>Cute, huh?!<\/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\/curl-multiple-urls-on-command-line-tutorial\/'>Curl Multiple URLs on Command Line Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cphpcsvclt'>Previous relevant <a target=_blank title='Curl via PHP to CSV on Command Line Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/curl-via-php-to-csv-on-command-line-tutorial\/'>Curl via PHP to CSV on Command Line 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\/curl_d.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Curl via PHP to CSV on Command Line Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/curl_d.jpg\" title=\"Curl via PHP to CSV on Command Line Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Curl via PHP to CSV on Command Line Tutorial<\/p><\/div>\n<p>Like with <a title='XML to CSV Command Line Report Tutorial' href='#xmlcsvclrt'>XML to CSV Command Line Report Tutorial<\/a> today&#8217;s tutorial uses a Linux or Mac OS X (Terminal application) command line to end up with a <a target=_blank title='CSV information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Comma-separated_values'>CSV<\/a> (comma separated values) file, which can be input for just about any spreadsheet application you care to mention.<\/p>\n<p>Today&#8217;s tutorial lays to rest a misnomer that an avid reader of this blog may have come to believe, that being that the marvellous <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'>curl<\/a> can not be used with more than the one ? and &amp; argument involved because of the dual purpose &amp; has in &#8220;command line land&#8221; meaning &#8220;send this command into the background&#8221;.  We can, use that &amp; if that &amp; appears within a <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'>curl<\/a> command &#8220;-d&#8221; switch as per &#8230;<\/p>\n<blockquote cite='http:\/\/www.computerhope.com\/unix\/curl.htm'>\n<table>\n<tr>\n<td>-d, &#8211;data &lt;data&gt;<\/td>\n<td>\n<p>(HTTP) Sends the specified data in a POST request to the HTTP server, in a way that can emulate as if a user has filled in an HTML form and pressed the submit button. Note that the data is sent exactly as specified with no extra processing (with all newlines cut off). The data is expected to be &#8220;url-encoded&#8221;. This will cause curl to pass the data to the server using the content-type application\/x-www-form-urlencoded. Compare to -F\/&#8211;form. If this option is used more than once on the same command line, the data pieces specified will be merged together with a separating &#8220;&#038;&#8221; character. Thus, using &#8216;-d name=daniel -d skill=lousy&#8217; would generate a POST chunk that looks like &#8216;name=daniel&#038;skill=lousy&#8217;.<\/p>\n<p>If you start the data with the &#8220;@&#8221; character, the rest should be a file name to read the data from, or &#8220;-&#8221; (dash) if you want curl to read the data from stdin. The contents of the file must already be url-encoded. Multiple files can also be specified. Posting data from a file named &#8216;foobar&#8217; would thus be done with &#8220;&#8211;data @foo-bar&#8221;.<\/p>\n<p>-d\/&#8211;data is the same as &#8211;data-ascii. To post data purely binary, you should instead use the &#8211;data-binary option. To URL-encode the value of a form field you may use &#8211;data-urlencode.<\/p>\n<p>If this option is used several times, the ones following the first will append data.<\/td>\n<\/tr>\n<\/table>\n<\/blockquote>\n<p>Notice how this &#8220;-d&#8221; switch uses POST to send data.  That needs a serverside webpage as its destination, hence the PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php_GETME\">interpret_curl_d.php<\/a> code (making use of the $_POST array) that we make dual purpose today &#8230;<\/p>\n<ol>\n<li>can support &#8220;surfing the net&#8221; mode of use (eg. <a target=_blank title='HTTP:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php?column1=value%201&#038;column2=value%202&#038;column3=value%203' href='http:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php?column1=value%201&#038;column2=value%202&#038;column3=value%203'>HTTP:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php?column1=value%201&#038;column2=value%202&#038;column3=value%203<\/a>) from a web browser address bar &#8230;<br \/>\n<iframe  style='height:250px;' src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php?column1=value%201&#038;column2=value%202&#038;column3=value%203\"><\/iframe>\n<\/li>\n<li>can support being the recipient of a command line <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'>curl<\/a> command line &#8230;<br \/>\n<code><br \/>\ncurl -d \"column1=value 1&amp;column2=value 2&amp;column3=value 3\" HTTP:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php 2&gt; \/dev\/null<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p> &#8230; the former showing an HTML table displaying neatly in a webpage, the latter showing the verbose form of this with the full HTML of the formation of that webpage (with all the &lt;&#8216;s and &gt;&#8217;s that involves) on the command line.  But doesn&#8217;t the data here remind you of a spreadsheet?  It does to us, so can we get the command line work reflect that.  Spoiler alert &#8230; yes.<\/p>\n<p>We add some Linux (command line) or Mac OS X (command line) smarts as per &#8230;<\/p>\n<p><span>curl -d &quot;column1=value 1&amp;column2=value 2&amp;column3=value 3&quot; HTTP:\/\/www.rjmprogramming.com.au\/PHP\/interpret_curl_d.php 2&gt; \/dev\/null<\/span><span>&nbsp;|&nbsp;<\/span><span>xargs<\/span><span>&nbsp;|&nbsp;<\/span><span>egrep -o &quot;&lt;t[dh]&gt;.*?&lt;\/t[dh]&gt;&quot;<\/span><span>&nbsp;|&nbsp;<\/span><span>tr -d &quot;\\n&quot;<\/span><span>&nbsp;|&nbsp;<\/span><span>sed &quot;\/\\&lt;\\\/th\\&gt;\\&lt;td\\&gt;\/s\/\/~\/&quot;<\/span><span>&nbsp;|&nbsp;<\/span><span>tr &quot;~&quot; &quot;\\n&quot;<\/span><span>&nbsp;|&nbsp;<\/span><span>sed &apos;\/\\&lt;td\\&gt;\/s\/\/\/g&apos;<span>&nbsp;|&nbsp;<\/span><span>sed &apos;\/\\&lt;\\\/td\\&gt;\/s\/\/,\/g&apos;<span>&nbsp;|&nbsp;<\/span> <span>sed &apos;\/\\&lt;th\\&gt;\/s\/\/\/g&apos;<span>&nbsp;|&nbsp;<\/span> <span>sed &apos;\/\\&lt;\\\/th\\&gt;\/s\/\/,\/g&apos;<span>&nbsp;|&nbsp;<\/span><span>sed &apos;\/,$\/s\/\/\/g&apos;<\/span><\/p>\n<p> &#8230; to get (around the full circle) back to be CSV data (command line) output &#8230;<\/p>\n<p><code><br \/>\ncolumn1,column2,column3<br \/>\nvalue 1,value 2,value 3<br \/>\n<\/code><\/p>\n<hr>\n<p id='xmlcsvclrt'>Previous relevant <a target=_blank title='XML to CSV Command Line Report Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/xml-to-csv-command-line-report-tutorial\/'>XML to CSV Command Line Report 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\/csv_via_xml_report_cl.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"XML to CSV Command Line Report Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report_cl.jpg\" title=\"XML to CSV Command Line Report Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">XML to CSV Command Line Report Tutorial<\/p><\/div>\n<p>The recent <a title='XML to CSV Report Primer Tutorial' href='#xmlcsvrpt'>XML to CSV Report Primer Tutorial<\/a> referenced two of our Three PHP Modes of Use, they being &#8230;<\/p>\n<ul>\n<li>surfing the net &#8230; passing the &#8220;batch&#8221; feeling part of the job to &#8230;<\/li>\n<li>curl &#8230; that hybrid of web server (call) and command line environment modes &#8230; but left out &#8230;<\/li>\n<li><em>command line<\/em><\/li>\n<\/ul>\n<p> &#8230; and so <font size=1>&#8230; you guessed it, non-robots &#8230;<\/font> we are here today allowing for the same codebase to also work it for that &#8220;command line&#8221; PHP mode of use via &#8230;<\/p>\n<p><code>php csv_via_xml_report.php [XML-filespec]<\/code><\/p>\n<p> &#8230; and then, when it gets to the &#8220;batch&#8221; feeling bit, no &#8220;curl&#8221;, but a series of &#8230;<\/p>\n<p><code>exec(\"php csv_via_xml_report.php XML-filename.xml\");<\/code><\/p>\n<p> &#8230; type calls.  Why no &#8220;curl&#8221;?  As much as anything because &#8220;curl&#8221; requires a URL as the first parameter, and to map a path to some PHP at the &#8220;command line&#8221; to a &#8220;curl&#8221; URL, even if possible, is not worth the risk of getting it wrong, so much better to do that recursive feeling &#8220;PHP command line everywhere&#8221; arrangement.<\/p>\n<p>Which gives us another chance to show you some more angles on strategies, within the one PHP codebase, of differentiating a &#8220;surfing the net&#8221; scenario with a (PHP) &#8220;command line&#8221; mode of use scenario.  Up the top, we gather most of this logic as per (the new) &#8230;<\/p>\n<p><code><br \/>\n $line='';<br \/>\n $numargs=-1;<br \/>\n $gxml=\"\";<br \/>\n $pxml=\"\";<br \/>\n $ziparr = array();<br \/>\n <br \/>\n function outin($inh) {<br \/>\n   global $numargs;<br \/>\n   if ($numargs &lt;= 0) {<br \/>\n     return $inh;<br \/>\n   } else {<br \/>\n     $huhr='';<br \/>\n     $wo=false;<br \/>\n     $inh=str_replace(\"&lt;\/title&gt;\",\"\\n\",str_replace(\"&lt;\/p&gt;\",\"\\n\",str_replace(\"&lt;\/tr&gt;\",\"\\n\",str_replace(\"&lt;br&gt;\",\"\\n\",$inh))));<br \/>\n     for ($iu=0; $iu&lt;strlen($inh); $iu++) {<br \/>\n       if (substr($inh, $iu, 1) == '&gt;') {<br \/>\n         $wo=true;<br \/>\n       } else if (substr($inh, $iu, 1) == '&lt;') {<br \/>\n         $wo=false;<br \/>\n       } else if ($wo) {<br \/>\n         $huhr.=substr($inh, $iu, 1);<br \/>\n       }<br \/>\n     }<br \/>\n     return $huhr;<br \/>\n   }<br \/>\n }<br \/>\n  <br \/>\n if (isset($_GET['xml'])) { \/\/ surfing the net<br \/>\n  $gxml=$_GET['xml'];<br \/>\n } else if (isset($_POST['xml'])) { \/\/ surfing the net<br \/>\n  $pxml=$_POST['xml'];<br \/>\n } else if (isset($argv)) { \/\/ command line<br \/>\n  $numargs = sizeof($argv);<br \/>\n  if ($numargs &lt;= 1) {<br \/>\n   if (PHP_OS == 'WINNT') {<br \/>\n    echo '$ XML File(spec) or URL: ';<br \/>\n    $line = stream_get_line(STDIN, 1024, PHP_EOL);<br \/>\n   } else {<br \/>\n    $line = <a target=_blank title='PHP readline information' href='http:\/\/php.net\/manual\/en\/function.readline.php'>readline<\/a>('$ XML File(spec) or URL: ');<br \/>\n   }<br \/>\n   $gxml=urlencode($line);<br \/>\n  } else {<br \/>\n   $gxml=$argv[1];<br \/>\n   array_push($ziparr, $argv[1]);<br \/>\n   for ($iu=2; $iu&lt;$numargs; $iu++) {<br \/>\n    $gxml.=' ' . $argv[$iu];<br \/>\n    array_push($ziparr, $argv[$iu]);<br \/>\n   }<br \/>\n   $gxml=urlencode($gxml);<br \/>\n  }<br \/>\n }<br \/>\n<\/code><\/p>\n<p> &#8230; to get to a point where in any code below this wherever we had &#8230;<\/p>\n<ul>\n<li>&#8220;isset($_GET[&#8216;xml&#8217;])&#8221; now we should have &#8220;$gxml != &#8221;&#8221;<\/li>\n<li>&#8220;$_GET[&#8216;xml&#8217;]&#8221; now we should have &#8220;$gxml&#8221;<\/li>\n<li>&#8220;isset($_POST[&#8216;xml&#8217;])&#8221; now we should have &#8220;$pxml != &#8221;&#8221;<\/li>\n<li>&#8220;$_POST[&#8216;xml&#8217;]&#8221; now we should have &#8220;$pxml&#8221;<\/li>\n<\/ul>\n<p> &#8230; which just leaves one area of concern left (after just letting all those extra functionality $_GET[] and $_POST[] &#8220;smarts&#8221; in the code go through to the keeper for now, as far as &#8220;command line&#8221; usage goes (because they are not recognized in that mode of use)), that being the &#8220;batch&#8221; feeling bit.  We have to cater for two &#8220;command line&#8221; usage scenarios, namely &#8230;<\/p>\n<ul>\n<li>php csv_via_xml_report.php &#8230; where we glean via PHP&#8217;s readline a filespec of XML files, off the user<\/li>\n<li>php csv_via_xml_report.php XML-filespec*.xml \/\/ type of usage, where, at least with Linux, by the time this gets into the PHP &#8220;XML-filespec*.xml&#8221; will have been expanded into an $argv array captures command line argument string (part) looking like &#8220;XML-filespec1.xml XML-filespec2.xml XML-filespec3.xml XML-filespec4.xml&#8221;<\/li>\n<\/ul>\n<p> &#8230; the latter of which presents an unnatural fit for (good ol&#8217;) PHP <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'>glob<\/a>, so we help glob out with lots of calls of it, each with a single file used, to help out with this quirky situation.<\/p>\n<p>The other thing is with filenames that might contain special characters it is best expressing them on the command line PHP invocation surrounded by double quotes.<\/p>\n<p><code><br \/>\n     if ($numargs &gt;= 1) {<br \/>\n     exec(\"php \" . $argv[0] . ' \"' . $xmlfil . '\"');<br \/>\n     } else {<br \/>\n     exec(\"curl \" . \"HTTP:\/\/\" . $_SERVER['SERVER_NAME'] . \":\" . $_SERVER['SERVER_PORT'] . explode(\"?\",$_SERVER['REQUEST_URI'])[0] . '?xml=' . urlencode($xmlfil));<br \/>\n     }<br \/>\n<\/code><\/p>\n<p>Remember when this became the go all those years ago when DOS filename limit prefix08.ex3 got loosened to allow for longer filenames?<\/p>\n<p>Notice above the PHP inhouse function &#8220;outin&#8221;?  Why call it &#8220;outin&#8221;?  Well, a bit like the HTML property <a target=_blank title='HTML innerText property information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/prop_node_innertext.asp'>&#8220;innerText&#8221;<\/a> stripping out the caret&#8217;y bits that HTML surrounds the &#8220;data&#8221; with, to just give you the &#8220;data&#8221;, we think we are paring down the HTML elements&#8217; <a target=_blank title='HTML outerHTML property information' href='http:\/\/help.dottoro.com\/ljloliex.php'>outerHTML<\/a> (look on a webpage within a web browser) to &#8220;innerText&#8221; (or <a target=_blank title='HTML innerHTML property information' href='http:\/\/www.w3schools.com\/jsref\/prop_html_innerhtml.asp'>innerHTML<\/a>s if you like) pared down (text) &#8220;data&#8221; that more suits a command line environment report requirement.<\/p>\n<p>Seems a bit of a struggle, doesn&#8217;t it?  Well, that could be me, but it is also (to do with) peeling back to what used to be.  All desktop programs, before the days of the net and the GUIs (eg. Windows, Mac OS X), on the command line, used functions like PHP&#8217;s readline to glean interactively input data from users, and wait around for them to hit carriage return &#8230; ahhhhhhhhhhh &#8230; off to the next!  Hope you can see the greater flexibility of webpage forms (perhaps a descendant of GUI dialog boxes), where a &#8220;whole lot of what is in store for the user&#8221; can be presented to the user, all at once <font size=1>&#8230; if your modern day user has not developed &#8220;form fatigue&#8221;, that is<\/font>.<\/p>\n<p>Our genericized <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.php--GETME\">csv_via_xml_report.php<\/a> PHP code got &#8220;command line&#8221;d via <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.php--GETME\">today&#8217;s changes<\/a>) and it still remains the case that we have no live run today, it best to say we would prefer you to download this yourself onto a local web server environment such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> and proceed to do your <strike>thing<\/strike>thang.  We hope you see what we mean with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report_cl.jpg\" title=\"Click picture\">tutorial picture<\/a> synopsis of what we are talking about here.<\/p>\n<hr>\n<p id='xmlcsvrpt'>Previous relevant <a target=_blank title='XML to CSV Report Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/xml-to-csv-report-primer-tutorial\/'>XML to CSV Report 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\/csv_via_xml_report.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"XML to CSV Report Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.jpg\" title=\"XML to CSV Report Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">XML to CSV Report Primer Tutorial<\/p><\/div>\n<p>Today, we&#8217;re building on the foundation of <a title='Google Chart via CSV or JSON or XML Tutorial' href='#gccsvjsonxmlt'>Google Chart via CSV or JSON or XML Tutorial<\/a>&#8216;s xml_to_csv.php PHP code to build a framework for an &#8220;XML to CSV [Job Description] Report&#8221; web application.  This web application will add an &#8220;onions of the 4th dimension&#8221; on top of that previous &#8220;single file\/single simplexml CSV output&#8221; paradigm by &#8230;<\/p>\n<ul>\n<li>allow for &#8220;single file(spec)\/(perhaps multiple) CSV report output file(s)&#8221; paradigm (via PHP&#8217;s <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'>glob<\/a> function) &#8230; and using &#8230;<\/li>\n<li>PHP <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> calling of <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'><i>curl<\/i><\/a> &#8230; to achieve this &#8230; calling on the passing between two of our three PHP Modes of Use (surfing the web, curl, command line) concepts<\/li>\n<\/ul>\n<p> &#8230; the power of curl being it is less of a concern going to anything different environmentally when entering the &#8220;curl&#8221; world (from the &#8220;surfing the web&#8221; world).  Mind you, this becomes a lot harder with more than one argument involved when using a Linux operating system because the &#8220;surfing the web&#8221; &#8220;&#038;&#8221; usage does not go very kindly with the &#8220;&#038;&#8221; &#8220;curl&#8221; (but in the command line as well) scenario where the &#8220;&#038;&#8221; has a background process control meaning.<\/p>\n<p>This is where PHP exec hanging around until finished is so useful, because we can check on how the processing went after the exec() call by checking for the existence of the predicted output filename, which is included in our genericized <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.php-GETME\">csv_via_xml_report.php<\/a> PHP code (and how we got there <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.php-GETME\">from xml_to_csv.php<\/a>) today (alas, we have no live run today, it best to say we would prefer you to download this yourself onto a local web server environment such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'><i>MAMP<\/i><\/a> and proceed to do your <strike>thang<\/strike>thing).  Nevertheless, see what we mean with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv_via_xml_report.jpg\" title=\"Click picture\">tutorial picture<\/a> synopsis of what we are talking about here, where we can see there are three things for you to do, once downloaded, to get your own version of this code to &#8220;first unit test status&#8221; &#8230;<\/p>\n<ol>\n<li><code>$jobbits=\"Job Description Goes Here\";  <b>\/\/ fill this in<\/b><\/code><\/li>\n<li><code>\/\/ Start of business logic piecing together CSV report ...<br \/>\n   $cont=file_get_contents($inxml);<br \/>\n   $detailrec='';<br \/>\n   <i>$detailrec='\"col1value\",\"col2value\"';<\/i> <b>\/\/ you do more in depth work to get to this point via $cont<\/b><\/code>\n<\/li>\n<li><code>if (trim($detailrec) != \"\") {<br \/>\n     <i>$headerrec='\"col1label\",\"col2label\"';<\/i> <b>\/\/ you do more in depth work to get a header record as required via $cont<\/b><br \/>\n     if ($outrpt != \"\" && 1 == 1) {<br \/>\n       if ($headerrec != \"\") { $headerrec.=\"\\n\";  }<br \/>\n       file_put_contents($outrpt, $headerrec . $detailrec);<br \/>\n       exit;<br \/>\n     } else {<br \/>\n       if ($headerrec != \"\") { $headerrec.=\"&lt;br&gt;\";  }<br \/>\n       echo \"&lt;html&gt;&lt;body&gt;&lt;div&gt;\" . $headerrec . $detailrec . \"&lt;\/div&gt;&lt;\/body&gt;&lt;\/html&gt;\";<br \/>\n       return null;<br \/>\n     }<br \/>\n   }<br \/>\n   \/\/ End of business logic piecing together CSV report<\/code>\n<\/li>\n<\/ol>\n<p> &#8230; and if it&#8217;s MAMP you are using, a unit test happens with a web browser address bar URL of &#8230;<\/p>\n<p><code>HTTP:\/\/localhost:8888\/csv_via_xml_report.php<\/code><\/p>\n<p>We hope this is an idea you can apply to some XML data processing spreadsheet reporting job you have to do.<\/p>\n<hr>\n<p id='gccsvjsonxmlt'>Previous relevant <a target=_blank title='Google Chart via CSV or JSON or XML Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-or-json-or-xml-tutorial\/'>Google Chart via CSV or JSON or XML Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart via CSV or JSON or XML Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_ox.jpg\" title=\"Google Chart via CSV or JSON or XML Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart via CSV or JSON or XML Tutorial<\/p><\/div>\n<p>Building on yesterday&#8217;s <a title='Google Chart via CSV or JSON Sharing Tutorial' href='#gccsvjsonst'>Google Chart via CSV or JSON Sharing Tutorial<\/a>, again, we have a dual purpose set of improvements for you today regarding our CSV or JSON to <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> web application, those being &#8230;<\/p>\n<ul>\n<li><a target=_blank title='XML information from w3schools' href='http:\/\/www.w3schools.com\/xml\/default.asp'>XML<\/a> input data functionality<\/li>\n<li>data column prefix or suffix exclusion (characters) allowing scope for numerical sorting of currency data for example<\/li>\n<\/ul>\n<p>We want to thank <a target=_blank href='https:\/\/edmondscommerce.github.io\/php\/generic-xml-to-csv-converter.html' title='Useful webpage, thanks'>this great webpage<\/a> for the heads up about the possibility to use PHP&#8217;s <a target=_blank href='http:\/\/www.w3schools.com\/php\/php_ref_simplexml.asp'>simplexml<\/a> methodologies to convert XML data to CSV (in the simple and well formed data cases) that we&#8217;ve discussed before regarding a similar scenario with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/xml-to-html-php-three-ways-translation-tutorial\/' title='XML to HTML PHP Three Ways Translation Tutorial'>XML to HTML PHP Three Ways Translation Tutorial<\/a>.  In order to make all this happen for both &#8230;<\/p>\n<ul>\n<li>Ajax call &#8230; and &#8230;<\/li>\n<li>XML local file browsed for<\/li>\n<\/ul>\n<p> &#8230; scenarios we needed to write a PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/xml_to_csv.php\" title='Live run'>XML to CSV converter<\/a> called <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/xml_to_csv.php_GETME\">xml_to_csv.php<\/a> which we show you in action below &#8230;<\/p>\n<div style='width:100%;height:290px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style='width:100%;height:300px;' title='XML to CSV converter' src='\/\/www.rjmprogramming.com.au\/PHP\/xml_to_csv.php'><\/iframe><\/div>\n<p>Allowing for character exclusions at the start or end of column data, to allow currency data be sorted (and filtered) numerically is just a case of offering a link that brings up a Javascript prompt box to ask the user for a whole of CSV or JSON or XML document file application of this character exclusion rule.<\/p>\n<p>You can see both of these concepts playing out with the URL <a target=\"_blank\" title=\"Breakfast Menu XML\" style=\"word-wrap:break-word;\"  href=\"\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Breakfast+Menu&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Price&#038;desc=Calories&#038;label=%27name%27&#038;value=Life+Expectancy%2CFertility+Rate%2C%27Region%27%2CPopulation&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=1%2C3&#038;exclude=%24&#038;data=HtTp%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2Fbreakfast_menu.xml%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FPieChart%2Fpie_chart.php%3Ftitle%3DPie%2520Chart%2520via%2520CSV%26onclick%3Dy%26task%3DTask%26desc%3DPercentage\">https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Breakfast+Menu&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Price&#038;desc=Calories&#038;label=%27name%27&#038;value=Life+Expectancy%2CFertility+Rate%2C%27Region%27%2CPopulation&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=1%2C3&#038;exclude=%24&#038;data=HtTp%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2Fbreakfast_menu.xml%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FPieChart%2Fpie_chart.php%3Ftitle%3DPie%2520Chart%2520via%2520CSV%26onclick%3Dy%26task%3DTask%26desc%3DPercentage<\/a> as shown live below &#8230;<\/p>\n<div style='width:100%;height:890px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style='width:100%;height:900px;' title='Breakfast Menu XML currency character excluded' src='\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Breakfast+Menu&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Price&#038;desc=Calories&#038;label=%27name%27&#038;value=Life+Expectancy%2CFertility+Rate%2C%27Region%27%2CPopulation&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=1%2C3&#038;exclude=%24&#038;data=HtTp%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2Fbreakfast_menu.xml%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FPieChart%2Fpie_chart.php%3Ftitle%3DPie%2520Chart%2520via%2520CSV%26onclick%3Dy%26task%3DTask%26desc%3DPercentage'><\/iframe><\/div>\n<p>So see what we did to get to where we are today &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Google Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html---------GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html---------GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js------GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js------GETME\" title=\"csv_to_bubblechart.js\">this way<\/a><\/li>\n<\/ul>\n<p>Maybe you have some of your own CSV or JSON or XML data to show in chart form, yourself?  We hope these ideas help you out.<\/p>\n<hr>\n<p id='gccsvjsonst'>Previous relevant <a target=_blank title='Google Chart via CSV or JSON Sharing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-or-json-sharing-tutorial\/'>Google Chart via CSV or JSON Sharing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart via CSV or JSON Sharing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_cs.jpg\" title=\"Google Chart via CSV or JSON Sharing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart via CSV or JSON Sharing Tutorial<\/p><\/div>\n<p>Building on the recent <a title='Google Chart via CSV or JSON Filtering Tutorial' href='#gccsvjsonft'>Google Chart via CSV or JSON Filtering Tutorial<\/a> we have a dual purpose set of improvements for you today regarding our CSV or JSON to <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> web application, that being &#8230;<\/p>\n<ul>\n<li>email sharing of scenarios where your input CSV or JSON data is a URL via the user&#8217;s email client application means of emailing &#8230; and that long promised &#8230;<\/li>\n<li>correlation data examples for the <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/bubblechart' title='Bubble Chart'>Bubble Chart<\/a> are shown today<\/li>\n<\/ul>\n<p>You may know that whenever we talk about &#8220;user&#8217;s email client application&#8221; that means we are excluding PHP method=POST <a target=_blank title='PHP mail method information' href='http:\/\/php.net\/manual\/en\/function.mail.php'>mail<\/a> function approaches, and using, quite often large URLs (but not large enough to spill outside the URL length limits of the web server involved).  How can we do this with the amounts of data involved?  We break the issue into two parts &#8230;<\/p>\n<ol>\n<li>initial pass collects header information including, crucially, an input data URL arrangement that is started with &#8220;HtTp&#8221; the bother of using is the user&#8217;s way to flag that they may want to share the eventual output Google Chart via email (using the client email application &#8230; ie. &#8220;a&#8221; &#8220;<a target=_blank title='mailto information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tryit.asp?filename=tryhtml_link_mailto'><i>mailto:<\/i><\/a>&#8221; link) &#8230; that navigates to the same HTML and Javascript that has enough information to have a &#8230;<\/li>\n<li>second pass uses an Ajax approach to then fleshing out the &#8220;data&#8221; part to the whole issue, augmenting the header data passed in so as to be able to use HTML iframe element as an HTML form&#8217;s target=[iframeName] method=POST so that it can show the Google Chart asked for and be able to allow for emails that are making use of <em>new HTML<\/em> as per &#8230;<br \/>\n<code><br \/>\n<em>&lt;div id=dpremyiframe&gt;<\/em>&lt;a id=premyiframe href='#myh1' title='Back to top'&gt;^&lt;\/a&gt;<em>&lt;\/div&gt;<\/em>&lt;br&gt;<br \/>\n<\/code><br \/>\n &#8230; to have the new Javascript DOM statement as per &#8230;<br \/>\n<code><br \/>\n   document.getElementById('dpremyiframe').innerHTML+='&amp;nbsp;&amp;nbsp;&lt;a id=aemail href=\"mailto:?subject=' + encodeURIComponent(document.getElementById('title').value) + '&amp;body=' + encodeURIComponent(document.URL) + '\" title=\"Email Chart\"&gt;Email this Chart&lt;\/a&gt;';<br \/>\n<\/code><br \/>\n &#8230; allow for this new email sharing functionality to happen\n<\/li>\n<\/ol>\n<p>Now let&#8217;s show you a couple of Bubble Chart data correlation ideas we are thankful to <a target=_blank title='Great webpage, thanks' href='https:\/\/www2.stetson.edu\/~jrasp\/data.htm'>this great webpage<\/a> for sharing.<\/p>\n<ol>\n<li>U.S. Consumer Confidence Post WWII Data Example <a style=\"word-wrap: break-word;\" target=_blank title='EconData' href='\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=United+States+Consumer+Confidence+Post+WWII&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Year%27&#038;value=Unemployment%2CInflation%2C%27Presidential+Approval+Rate%27%2CConsumer+Confidence&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=0%2C1%2C2%2C3%2C4&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FEconData.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DUnited%2520States%2520Consumer%2520Confidence%2520Post%2520WWII%26onclick%3Dy%26label%3D%2527Year%2527%26value%3DUnemployment%252CInflation%252C%2527Presidential%2520Approval%2520Rate%2527%252CConsumer%2520Confidence'>\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=United+States+Consumer+Confidence+Post+WWII&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Year%27&#038;value=Unemployment%2CInflation%2C%27Presidential+Approval+Rate%27%2CConsumer+Confidence&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=0%2C1%2C2%2C3%2C4&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FEconData.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DUnited%2520States%2520Consumer%2520Confidence%2520Post%2520WWII%26onclick%3Dy%26label%3D%2527Year%2527%26value%3DUnemployment%252CInflation%252C%2527Presidential%2520Approval%2520Rate%2527%252CConsumer%2520Confidence<\/a>\n<div style='width:100%;height:890px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style='width:100%;height:900px;' title='U.S. Economic Data Example' src='\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=United+States+Consumer+Confidence+Post+WWII&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Year%27&#038;value=Unemployment%2CInflation%2C%27Presidential+Approval+Rate%27%2CConsumer+Confidence&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=0%2C1%2C2%2C3%2C4&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FEconData.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DUnited%2520States%2520Consumer%2520Confidence%2520Post%2520WWII%26onclick%3Dy%26label%3D%2527Year%2527%26value%3DUnemployment%252CInflation%252C%2527Presidential%2520Approval%2520Rate%2527%252CConsumer%2520Confidence'><\/iframe><\/div>\n<\/li>\n<li>World Poverty Data Example <a style=\"word-wrap: break-word;\" target=_blank title='Poverty' href='\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Female+Life+Expectancy+and+Birth+Rate+Correlation+to+GNP+Worldwide&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Country%27&#038;value=Female+Life+Expectancy%2CBirth+Rate%2C%27Region%27%2CGNP&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=7%2C4%2C0%2C6%2C5&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FPoverty.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DFemale%2520Life%2520Expectancy%2520and%2520Birth%2520Rate%2520Correlation%2520to%2520GNP%2520Worldwide%26onclick%3Dy%26label%3D%2527Country%2527%26value%3DFemale%2520Life%2520Expectancy%252CBirth%2520Rate%252C%2527Region%2527%252CGNP'>\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Female+Life+Expectancy+and+Birth+Rate+Correlation+to+GNP+Worldwide&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Country%27&#038;value=Female+Life+Expectancy%2CBirth+Rate%2C%27Region%27%2CGNP&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=7%2C4%2C0%2C6%2C5&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FPoverty.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DFemale%2520Life%2520Expectancy%2520and%2520Birth%2520Rate%2520Correlation%2520to%2520GNP%2520Worldwide%26onclick%3Dy%26label%3D%2527Country%2527%26value%3DFemale%2520Life%2520Expectancy%252CBirth%2520Rate%252C%2527Region%2527%252CGNP<\/a>\n<div style='width:100%;height:890px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style='width:100%;height:900px;' title='U.S. Economic Data Example' src='\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm?title=Female+Life+Expectancy+and+Birth+Rate+Correlation+to+GNP+Worldwide&#038;onclick=y&#038;wouldlikeyoutoseekpermission=y&#038;task=Task&#038;desc=Percentage&#038;label=%27Country%27&#038;value=Female+Life+Expectancy%2CBirth+Rate%2C%27Region%27%2CGNP&#038;country=Country&#038;popularity=Popularity&#038;area=Area&#038;width=556&#038;height=347&#038;desc1=Sold+Pencils&#038;title1=Sold+Pencils+title1&#038;text1=Sold+Pencils+text1&#038;desc2=Sold+Pens&#038;title2=Sold+Pens+title2&#038;text2=Sold+Pens+text2&#038;nf=7%2C4%2C0%2C6%2C5&#038;data=HtTps%3A%2F%2Fwww.rjmprogramming.com.au%2FHTMLCSS%2FPoverty.csv%23https%3A%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FBubbleChart%2Fbubble_chart.php%3Ftitle%3DFemale%2520Life%2520Expectancy%2520and%2520Birth%2520Rate%2520Correlation%2520to%2520GNP%2520Worldwide%26onclick%3Dy%26label%3D%2527Country%2527%26value%3DFemale%2520Life%2520Expectancy%252CBirth%2520Rate%252C%2527Region%2527%252CGNP'><\/iframe><\/div>\n<\/li>\n<\/ol>\n<p>So see what we did to get to where we are today after yesterday&#8217;s <a title='Google Chart Date Time Charts via CSV Tutorial' href='#gcdtccsvt'>Google Chart Date Time Charts via CSV Tutorial<\/a> &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html--------GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html--------GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js-----GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> needed no changes today<\/li>\n<\/ul>\n<hr>\n<p id='gccsvjsonft'>Previous relevant <a target=_blank title='Google Chart via CSV or JSON Filtering Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-or-json-filtering-tutorial\/'>Google Chart via CSV or JSON Filtering Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart via CSV or JSON Filtering Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_fl.jpg\" title=\"Google Chart via CSV or JSON Filtering Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart via CSV or JSON Filtering Tutorial<\/p><\/div>\n<p>One of the more challenging parts of data representation can be filtering out too much data, for presentation purposes.  We are going to refer to this issue as a &#8220;filtering&#8221; issue.<\/p>\n<p>Building on yesterday&#8217;s <a title='Google Chart via CSV or JSON Tutorial' href='#gccsvjsont'>Google Chart via CSV or JSON Tutorial<\/a> this filtering doesn&#8217;t care about the format of the data, just if the user is interested to apply it to any column of interest to them within a CSV (as the common denominator) column.  As you can imagine, this involves reading through all the CSV data to arrive at some &#8230;<\/p>\n<p><code><br \/>\nminimum range to maximum range<br \/>\n<\/code><\/p>\n<p> &#8230;. values for each column, always in terms of &#8230;<\/p>\n<ul>\n<li>alphabetical sorting &#8230; and sometimes also in terms of &#8230;<\/li>\n<li>numerical sorting &#8230; depending on the nature of the column data involved<\/li>\n<\/ul>\n<p> &#8230; and once collected, in a Javascript function called via a <a target=_blank title='Javascript setTimeout method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'><i>setTimeout<\/i><\/a> timer so as not to interfere with the main workflow of the web application, we present to a user who hovers or clicks on a column dropdown &#8220;a&#8221; links to the up to 4 potential ranges of interest, ready for the user to redefine as they wish to &#8220;filter&#8221; data that goes to the Google Chart interfacer of interest.<\/p>\n<p>Think the search engines, and they have algorithms to determine what shows above the fold for search results.  This is a &#8220;filtering&#8221; mechanism they apply to a set of data too complex to present in a first come, first served way.<\/p>\n<p>Again, see what we did to get to where we are today, below &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html------GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html------GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js-----GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js-----GETME\" title=\"csv_to_bubblechart.js\">this way<\/a><\/li>\n<\/ul>\n<p>You can also see this play out at WordPress 4.1.1&#8217;s <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-or-json-filtering-tutorial\/'>Google Chart via CSV or JSON Filtering Tutorial<\/a>.<\/p>\n<hr>\n<p id='gccsvjsont'>Previous relevant <a target=_blank title='Google Chart via CSV or JSON Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-or-json-tutorial\/'>Google Chart via CSV or JSON Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart via CSV or JSON Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_oj.jpg\" title=\"Google Chart via CSV or JSON Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart via CSV or JSON Tutorial<\/p><\/div>\n<p>Our progression with the &#8220;CSV to Google Charts&#8221; web application today, building on yesterday&#8217;s <a title='Google Chart via CSV Header Data Tutorial' href='#gccsvhdt'>Google Chart via CSV Header Data Tutorial<\/a>, is to widen the net and name the web application &#8220;CSV or JSON to Google Charts&#8221;.  The <a target=_blank title='JSON information from w3schools' href='http:\/\/www.w3schools.com\/json\/default.asp'>JSON<\/a> protocol represents a common means by which hierarchical data can be represented in the online world.  As such, though we cannot guarantee the more complex hierarchy of data found in JSON data, we thank the contributors to <a target=_blank title='Great webpage, thanks' href='https:\/\/stackoverflow.com\/questions\/8847766\/how-to-convert-json-to-csv-format-and-store-in-a-variable'>this great webpage<\/a> for the all but tinkering Javascript function we end up with that converts JSON data to CSV for usage in our web application.<\/p>\n<p>Also, today, now that we can edit header column data we can help out the &#8220;statistical&#8221; Google Charts &#8230;<\/p>\n<ul>\n<li>Area Chart<\/li>\n<li>Bar Chart<\/li>\n<li>Column Chart<\/li>\n<li>Line Chart<\/li>\n<\/ul>\n<p> &#8230; by allowing the user to add fields or rename fields of the default 3 fields expected by these chart types.  With this, we expect any new such fields to be numerical.<\/p>\n<p>The implication of this is that some quite complex scenarios can be reflected through the use of these chart types with this web application.<\/p>\n<p>So see what we did to get to where we are today, below &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html-----GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html-----GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js----GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js----GETME\" title=\"csv_to_bubblechart.js\">this way<\/a><\/li>\n<\/ul>\n<p>Thanks to the data of <a target=_blank title='ASX Historical Data' href='https:\/\/www.asxhistoricaldata.com\/'>ASX Historical Data<\/a> for the underpinnings of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_oj.jpg\">Line Chart some ASX Stocks data on 20180730 tutorial picture<\/a>.<\/p>\n<hr>\n<p id='gccsvhdt'>Previous relevant <a target=_blank title='Google Chart via CSV Header Data Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-via-csv-header-data-tutorial\/'>Google Chart via CSV Header Data Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart via CSV Header Data Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_hd.jpg\" title=\"Google Chart via CSV Header Data Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart via CSV Header Data Tutorial<\/p><\/div>\n<p>Many jobs that involve data form themselves into a &#8230;<\/p>\n<ul>\n<li>header<\/li>\n<li>details<\/li>\n<\/ul>\n<p> &#8230; data model.  It happens all the time in Information Technology.  Just think of General Ledgers in accounting.  At the database table level supporting these arrangements there&#8217;ll be a smaller sized header table off which there will be a mechanism to &#8220;drill down&#8221; into the details database table.<\/p>\n<p>In our current project, up until today, we&#8217;ve only taken a cursory interest in the &#8220;header&#8221; data thinking for it, offering only a pretty awkward and clunky mechanism for the user to enter a <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> title with that &#8220;#&#8221; method on the top textbox.  In our priorities for this job we were much more focussed on how to deal with the larger volumes of data, and this is always associated with the &#8220;details&#8221; of the Google Chart data.<\/p>\n<p>Within what we categorize into a &#8220;header&#8221; data categorization of the Google Chart data we would include &#8230;<\/p>\n<ul>\n<li>chart title<\/li>\n<li>chart axis labelling<\/li>\n<li>chart legend wording<\/li>\n<li>chart menu wording (on the Annotated Timeline Chart for instance)<\/li>\n<\/ul>\n<p> &#8230; the data items needed to &#8220;personalize&#8221; (or &#8220;particularize&#8221;) the data into the &#8220;business logic&#8221; associated with the CSV data (or subset of that data, being as we can select columns of interest with our web application) of the job.<\/p>\n<p>Behind the scenes even before today we&#8217;d hidden the &#8220;header&#8221; data into the HTML form (type=hidden) textboxes POSTed to the Google Chart interfacers, but today we &#8230;<\/p>\n<ul>\n<li>change relevant type=hidden textboxes in the HTML form to type=text style=display:inline (so that they line up in one row across the screen below the column selectors, and the use of HTML input <a target=_blank title='HTML placeholder attribute information from w3schools' href='https:\/\/www.w3schools.com\/tags\/att_input_placeholder.asp'>placeholder<\/a> attributes we think does away with the need for labels)<\/li>\n<li>make sure the HTML form &#8220;action&#8221; attribute reflects any user changed textbox fields<\/li>\n<li>add an HTML form onsubmit event function that makes these textboxes disappear once the CSV columns of interest are decided upon<\/li>\n<li>add a user entered &#8220;?&#8221; for the &#8220;title&#8221; textbox be a mechanism to preview the Google Chart of interest that shows the (often) complex user interactivity possibilities for that Google Chart, so that the user can do this with that &#8220;title&#8221; textbox as well should they be more advanced users<\/li>\n<\/ul>\n<p>So see what we did to get to where we are today after yesterday&#8217;s <a title='Google Chart Date Time Charts via CSV Tutorial' href='#gcdtccsvt'>Google Chart Date Time Charts via CSV Tutorial<\/a> &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html----GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html----GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js---GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> needed no changes today<\/li>\n<\/ul>\n<hr>\n<p id='gcdtccsvt'>Previous relevant <a target=_blank title='Google Chart Date Time Charts via CSV Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-date-time-charts-via-csv-tutorial\/'>Google Chart Date Time Charts via CSV Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Date Time Charts via CSV Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart_dt.jpg\" title=\"Google Chart Date Time Charts via CSV Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Date Time Charts via CSV Tutorial<\/p><\/div>\n<p>With the recent <a title='Google Chart More Charts via CSV Tutorial' href='#gcmccsvt'>Google Chart More Charts via CSV Tutorial<\/a>&#8216;s CSV file interfacing to our interfacings to <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a>s &#8230;<\/p>\n<ul>\n<li>Bubble Chart<\/li>\n<li>Pie Chart<\/li>\n<li>Histogram Chart<\/li>\n<li>Map Chart<\/li>\n<li>Geo Chart<\/li>\n<li>Intensity Chart<\/li>\n<li>Area Chart<\/li>\n<li>Bar Chart<\/li>\n<li>Column Chart<\/li>\n<li>Line Chart<\/li>\n<\/ul>\n<p> &#8230; did you notice a common theme, or perhaps a common non-theme?!  Yes, none of the Google Charts above involved date nor datetime fields.  So, today, we add &#8230;<\/p>\n<ul>\n<li>Annotated Timeline Chart<\/li>\n<li>Calendar Chart<\/li>\n<li>Timeline Chart<\/li>\n<\/ul>\n<p> &#8230; to the list, and so add some &#8220;when of life&#8221; interest to the potential for converting CSV data into meaningful chart data representations of that data.<\/p>\n<p>You might wonder, &#8220;Where&#8217;s the complication there?  Why didn&#8217;t this get scheduled earlier?&#8221;  Well, like we&#8217;ve mentioned before at this blog, really appreciate the times when you, as the programmer, are in charge of the form of the data, but this job is not such a case, alas.  We just do our best trying to imagine what might be thrown at the PHP (actually done in the Javascript client realms) as far as representing a date goes.  Sadly though, there are many ways to represent a date, and we just try to imagine what is likely here.  One difficult issue is the common way some countries represent dates in MM\/DD\/YYYY format.  We like a default set of thinking that a user will use DD\/MM\/YYYY and if MM\/DD\/YYYY is being used, we hope the first instance of its use is one where the &#8220;DD&#8221; used is bigger than &#8220;12&#8221;, and we can know the date format being used is more likely to be MM\/DD\/YYYY.  But please be aware there are many more delimiter and inhouse approaches that might pass by code that allows for date and\/or datetime based data.<\/p>\n<p>Later, at the interfacing to the Google Chart, the Google Chart wants dates or datetimes to be represented by a Date object (&#8220;constructor&#8221;).  Plain sailing once you get to this, as long as one last quirk is attended to &#8230;<\/p>\n<p><code><br \/>\nA date of 13 July 2018<br \/>\n ... needs a Google Chart date \"constructor\" of the form ...<br \/>\nnew Date(2018, 6, 13)<br \/>\n<\/code><\/p>\n<p> &#8230; Go <strike>Monthly Deficit<\/strike>Figure?!<\/p>\n<p>As for the HTML and Javascript supervisors &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html---GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html---GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js---GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js---GETME\" title=\"csv_to_bubblechart.js\">this way<\/a><\/li>\n<\/ul>\n<p> &#8230; interfacing to the changed Google Chart interfacer PHP code report <a style=\"word-wrap: break-word;\" href=\"HTTP:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-04&#038;dmdateb=2018-08-05\" target=\"_blank\">HTTP:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-04&#038;dmdateb=2018-08-05<\/a> &#8230;<\/p>\n<div style='width:100%;height:840px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style=\"height: 850px; width: 100%;\" src='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-04&#038;dmdateb=2018-08-05'><\/iframe><\/div>\n<hr>\n<p id='gcmccsvt'>Previous relevant <a target=_blank title='Google Chart More Charts via CSV Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-more-charts-via-csv-tutorial\/'>Google Chart More Charts via CSV Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart More Charts via CSV Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_chart.jpg\" title=\"Google Chart More Charts via CSV Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart More Charts via CSV Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Google Chart Bubble Chart via CSV Primer Tutorial' href='#gcbccsvpt'>Google Chart Bubble Chart via CSV Primer Tutorial<\/a> set us up with a strategy to move forward today, so that by end of day we have CSV to <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> &#8230;<\/p>\n<ul>\n<li>Bubble Chart<\/li>\n<li>Pie Chart<\/li>\n<li>Histogram Chart<\/li>\n<li>Map Chart<\/li>\n<li>Geo Chart<\/li>\n<li>Intensity Chart<\/li>\n<li>Area Chart<\/li>\n<li>Bar Chart<\/li>\n<li>Column Chart<\/li>\n<li>Line Chart<\/li>\n<\/ul>\n<p> &#8230; interfacing functionalities in play, involving coding, unit testing and implementing &#8230;<\/p>\n<blockquote><p>\n<em>PHP or HTML (supervisor) combination of non-&#8220;data*&#8221; named arguments transferred via $_GET[] (or $_SERVER[&#8216;QUERY_STRING&#8217;] off the ? and &#038; non-&#8220;data*&#8221; arguments of a form action=[URLPlusArguments] usage) ? and &amp; argument calls (via HTML form enctype=application\/x-www-urlencoded method=POST action=[(Google Chart interfacing) PHP]?title=etcetera) and $_POST[] (or <a target=_blank title='Good php:\/\/input information ... thanks' href='http:\/\/getluky.net\/2009\/02\/24\/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available\/'>php:\/\/input<\/a>, or a blank such result then uses parent.document.getElementById(&#8216;data&#8217;).value) &#8220;data*&#8221; arguments via HTML input &#8220;id=data name=data type=hidden&#8221; elements of a form enctype=application\/x-www-urlencoded method=POSTed data &#8230;<br \/>\n<code><br \/>\n\/\/<br \/>\n\/\/ ... This scenario above results in $GETdata=\"\";  \/\/ from that last code block above ... and so, then, further down ...<br \/>\n\/\/<br \/>\n      echo ' function drawChart() { ' . \"\\n\";<br \/>\n      if ($GETdata == \"\") {<br \/>\n      echo ' var wert=\"data=google.visualization.arrayToDataTable([ ' . ' [' . $GETlabel . ',' . $GETval . ']\"; ' . \"\\n\";<br \/>\n      echo \" wert+=parent.document.getElementById('data').value.replace(\/\\~\/g,\\\"'\\\").replace(\/\\'\\'\\'\\'\/g,\\\"''\\\"); \" . \"\\n\";<br \/>\n      echo ' wert+=\" ])\";' . \"\\n\";<br \/>\n      echo ' eval(wert); ' . \"\\n\";<br \/>\n      } else {<br \/>\n      echo ' data = google.visualization.arrayToDataTable([ ' . \"\\n\";<br \/>\n      echo \" [\" . $GETlabel . \",\" . $GETval . \"] \\n\";<br \/>\n      echo str_replace(\"''\" . \"''\", \"''\", str_replace(\"~\", \"'\", $GETdata));<br \/>\n      echo \"        ]);\\n\";<br \/>\n      }<br \/>\n      echo \"        var options = { \\n\";<br \/>\n      if (isset($hdgs[3])) {<br \/>\n      echo \"        title: '\" . $GETtitle . \"', \\n\";<br \/>\n      echo \"        hAxis: {title: '\" . $hdgs[0] . \"'},\" . \" \\n\";<br \/>\n      echo \"        vAxis: {title: '\" . $hdgs[1] . \"'},\" . \" \\n\";<br \/>\n      echo \"        bubble: {textStyle: {fontSize: 11}} \\n\";<br \/>\n      } else {<br \/>\n      echo \"        colorAxis: {colors: ['yellow', 'red']} \\n\";<br \/>\n      }<br \/>\n      echo \"       }; \\n\";<br \/>\n<\/code><br \/>\n &#8230; which we discovered today worked for the $_GET[] bit but not for the $_POST[] nor <a target=_blank title='Good php:\/\/input information ... thanks' href='http:\/\/getluky.net\/2009\/02\/24\/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available\/'>php:\/\/input<\/a> bits, but did for the parent.document.getElementById(&#8216;data&#8217;).value idea on iOS mobile platform web browsers<\/em> &#8230; and if cornered into the future we are yet to resort to &#8230;\n<\/p><\/blockquote>\n<p> &#8230; type changes for the Google Chart interfacers. As for the supervisors &#8230;<\/p>\n<ul>\n<li>supervisor CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html--GETME\" title=\"csv_to_bubblechart.htm\">csv_to_bubblechart.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.htm\" title=\"csv_to_bubblechart.htm\">live run<\/a> link web application changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html--GETME\" title=\"csv_to_bubblechart.htm\">this way<\/a> &#8230; calls and uses &#8230;<\/li>\n<li>external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js--GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js--GETME\" title=\"csv_to_bubblechart.js\">this way<\/a><\/li>\n<\/ul>\n<p> &#8230; they needed to follow patterns off the Bubble Chart &#8220;guinea pig&#8221; leads of the last couple of days.<\/p>\n<p>Days of &#8220;consolidation&#8221; like this can build on &#8220;slog work&#8221;!<\/p>\n<p>You can see Google Chart changes, today, via the report <a style=\"word-wrap: break-word;\" href=\"HTTP:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-01&#038;dmdateb=2018-08-02\" target=\"_blank\">HTTP:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-01&#038;dmdateb=2018-08-02<\/a><\/p>\n<div style='width:100%;height:590px;-webkit-overflow-scrolling: touch; overflow-y: scroll;'><iframe style=\"height: 600px; width: 100%;\" src='\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/prediff.php?dpath=HTTP:\/\/www.rjmprogramming.com.au\/&#038;dfilespec=PHP\/*\/*.*GETME&#038;dmdates=2018-08-01&#038;dmdateb=2018-08-02' width=\"300\" height=\"150\"><\/iframe><\/div>\n<hr>\n<p id='gcbccsvpt'>Previous relevant <a target=_blank title='Google Chart Bubble Chart via CSV Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-bubble-chart-via-csv-primer-tutorial\/'>Google Chart Bubble Chart via CSV Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Bubble Chart via CSV Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.jpg\" title=\"Google Chart Bubble Chart via CSV Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Bubble Chart via CSV Primer Tutorial<\/p><\/div>\n<p>The <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/bubblechart' title='Bubble Chart'>Bubble Chart<\/a> is a great tool to show correlations, and we&#8217;ll get more on that soon, but today, we wanted to use it to display some more United States data resource website <a target=_blank title='US data.gov' href='http:\/\/data.gov'>data.gov<\/a> derived data regarding &#8220;First Names of Babies in New York from 2011 to 2014&#8221;, as you can see happening in today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.jpg\" title=\"tutorial picture\">tutorial picture<\/a>.<\/p>\n<p>Google Chart Bubble Charts can handle 5 data properties as per &#8230;<\/p>\n<ul>\n<li>ID (could be character data) &#8230; uniquifier<\/li>\n<li>X position on X axis<\/li>\n<li>Y position on Y axis<\/li>\n<li>Legend (character data, the different values of, can form the Bubble Chart legend)<\/li>\n<li>Sizer numerical value affects diameter of Bubble<\/li>\n<\/ul>\n<p> &#8230; for each data point.  Later, in today&#8217;s CSV to Bubble Chart <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html_GETME\" title=\"csv_to_bubblechart.html\">csv_to_bubblechart.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html\" title=\"Click picture\">live run<\/a> link web application these data property choices make up the options of HTML select (dropdown) elements associated with each CSV (ie. comma separated values format) column where the user can assign a CSV column with a Bubble Chart &#8220;data property&#8221; role, and so give the web application a means by which to create the Bubble Chart, created after 5 of these dropdowns are given values.<\/p>\n<p>A CSV file URL completes the user data requirements here.  We thank <a target=_blank title='Useful link, thanks' href='https:\/\/groups.google.com\/forum\/#!topic\/comp.lang.javascript\/b4NvyJB2Ml4'>this useful link<\/a>, thanks, for good Ajax Javascript code to avoid a CSV being downloaded (as happens a lot when setting a CSV as an HTML iframe element &#8216;src&#8217; property value).<\/p>\n<p>The external Javascript today is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.js_GETME\" title=\"csv_to_bubblechart.js\">csv_to_bubblechart.js<\/a> completing the supervisory code team for the HTML iframe child Google Chart Bubble Chart interfacing <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php----GETME\" title=\"bubble_chart.php\" target=_blank>bubble_chart.php<\/a> changed <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php----GETME\" title=\"bubble_chart.php\" target=_blank>this way<\/a> for today&#8217;s work.<\/p>\n<p>You can enter your <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html\" title=\"Click picture\">own data here<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/csv_to_bubblechart.html?sel1=X&#038;sel2=&#038;sel3=Legend&#038;sel4=ID&#038;sel5=Sizer&#038;sel6=Y&#038;csv=HTTP:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mp.csv#Most Popular Baby Names by Mother Ethnic Group in New York City USA\" title=\"Simulate picture\">simulate today&#8217;s tutorial picture<\/a>.  There&#8217;s more to work on here, we&#8217;re thinking, and we hope you find this interesting.<\/p>\n<hr>\n<p id='gcbcsept'>Previous relevant <a target=_blank title='Google Chart Bubble Chart Select Event Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-bubble-chart-select-event-primer-tutorial\/'>Google Chart Bubble Chart Select Event 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\/BubbleChart\/bubble_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Bubble Chart Select Event Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart_select_event.jpg\" title=\"Google Chart Bubble Chart Select Event Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Bubble Chart Select Event Primer Tutorial<\/p><\/div>\n<p>Maybe you tried yesterday&#8217;s <a target=_blank title='Wordbank' href='http:\/\/wdi.worldbank.org'>Worldbank<\/a> data web application (via <a target=_blank title='PHP Worldbank Growth of Merchandise Trade Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-worldbank-growth-of-merchandise-trade-tutorial\/'>PHP Worldbank Growth of Merchandise Trade Tutorial<\/a>) on a mobile device and tried to zero in on a bubble &#8230; zero,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bubble &#8230; <font size=1>guess you had to be there<\/font> &#8230; and got so disappointed with the &#8220;dead fish&#8221; response that you ignored the <a target=_blank title='Vegemite' href='https:\/\/www.google.com.au\/search?q=vegemite&#038;ie=utf-8&#038;oe=utf-8&#038;gws_rd=cr&#038;ei=ijygVv_MKYeu0gSOp77YDQ'>vegemite<\/a> sandwich for lunch, which caused a butterfly in Brazil to heave a huge sigh &#8230; the world headlines followed &#8230; but you have my complete discretion on this!<\/p>\n<p>Anyway &#8230; for those inquisitive mobile users out there interested in Worldbank trade figures &#8230; <font size=2>please, not all at once<\/font> &#8230; let&#8217;s get <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/bubblechart' title='Bubble Chart'>Bubble Charts<\/a> working for their <a target=_blank title='Select event information from Google' href='https:\/\/developers.google.com\/chart\/interactive\/docs\/basic_interactivity'>Select event<\/a>, which is like a mobile touch event, while not interfering with the usual vegemite eating habits of your average laptop user &#8230; <font size=1>vege UP<\/font> . <font size=1>vege DOWN<\/font> . <font size=1>my body is a wigwam<\/font> . <font size=1>my body is a teepee<\/font> . <font size=2>aside (to gobsmacked audience with mouths open &#128562;): &#8220;patently they&#8217;re t<strike>w<\/strike>oo ten<strike>ts<\/strike>se&#8221;<\/font>.<\/p>\n<p>Software wise our new Google Chart Bubble Chart (Select event) integration involved &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php--GETME\" title=\"bubble_chart.php\" target=\"_blank\">bubble_chart.php<\/a> <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php--GETME\" title=\"bubble_chart.php\" target=\"_blank\">changes<\/a> (to cater for select event (mobile touch) functionality) and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php\" title='click picture'>live run<\/a> link<\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/growth_of_merchandise_trade.php-GETME\" title=\"growth_of_merchandise_trade.php\" target=\"_blank\">growth_of_merchandise_trade.php<\/a> <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/growth_of_merchandise_trade.php-GETME\" title=\"growth_of_merchandise_trade.php\" target=\"_blank\">changes<\/a> (to cater for select event (mobile touch) functionality) and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/growth_of_merchandise_trade.php\" title='growth_of_merchandise_trade.php'>live run<\/a> link for yesterday&#8217;s web application<\/li>\n<\/ul>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Bubble Charts information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/bubblechart' title='Bubble Chart'>via Google<\/a>.<\/p>\n<p>This extra &#8216;select&#8217; event functionality, available via the suffix \u201c&#038;onclick=y\u201d applied to the Google Chart Bubble Chart title, flows on directly to the iPad iOS App we created and talked about, last, with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/xcode-swift-ios-application-end-game-primer-tutorial\/' title='Xcode Swift iOS Application End Game Primer Tutorial'>Xcode Swift iOS Application End Game Primer Tutorial<\/a>.<\/p>\n<p>So please try creating your own emailable Google Chart live run for &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BubbleChart\/bubble_chart.php\" title=\"bubble_chart.php\" target=\"_blank\">Bubble Chart<\/a><\/li>\n<\/ul>\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='#d19641' onclick='var dv=document.getElementById(\"d19641\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/bubble-chart\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d19641' 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='#d39844' onclick='var dv=document.getElementById(\"d39844\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ajax\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39844' 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='#d39881' onclick='var dv=document.getElementById(\"d39881\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/testing\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39881' 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='#d39945' onclick='var dv=document.getElementById(\"d39945\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/date\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39945' 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='#d39962' onclick='var dv=document.getElementById(\"d39962\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/header\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39962' 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='#d39980' onclick='var dv=document.getElementById(\"d39980\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/json\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d39980' 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='#d40002' onclick='var dv=document.getElementById(\"d40002\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/filter\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d40002' 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='#d40075' onclick='var dv=document.getElementById(\"d40075\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/email\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d40075' 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='#d40093' onclick='var dv=document.getElementById(\"d40093\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/xml\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d40093' 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='#d40850' onclick='var dv=document.getElementById(\"d40850\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/curl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d40850' 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='#d40888' onclick='var dv=document.getElementById(\"d40888\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/command-line\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d40888' 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='#d44734' onclick='var dv=document.getElementById(\"d44734\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/curl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44734' 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='#d44734' onclick='var dv=document.getElementById(\"d44734\"); 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='d44734' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Continuing on from yesterday&#8217;s Curl via PHP to CSV on Command Line Tutorial with more Linux or Mac OS X command line curl brilliance, did you know that you can run several URLs from the one curl command line statement? &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/curl-multiple-urls-on-command-line-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":[233,234,284,932,1122,1319,1345],"class_list":["post-44745","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-command","tag-command-line","tag-curl","tag-php","tag-server","tag-tutorial","tag-url"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44745"}],"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=44745"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44745\/revisions"}],"predecessor-version":[{"id":57000,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44745\/revisions\/57000"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=44745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=44745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=44745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}