{"id":34322,"date":"2017-11-15T03:01:04","date_gmt":"2017-11-14T17:01:04","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=34322"},"modified":"2017-11-14T19:47:10","modified_gmt":"2017-11-14T09:47:10","slug":"php-file-information-media-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-file-information-media-tutorial\/","title":{"rendered":"PHP File Information Media Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Information Media Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information_media.jpg\" title=\"PHP File Information Media Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Information Media Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='PHP File Information Primer Tutorial' href='#phpfipt'>PHP File Information Primer Tutorial<\/a> was the start of a web application breakdown of a URL file specification at the rjmprogramming.com.au domain harnessing the talents of &#8230;<\/p>\n<ul>\n<li>Linux <a target=_blank title='Linux file command information from computerhope' href='https:\/\/www.computerhope.com\/unix\/ufile.htm'>file<\/a> command &#8230; called by &#8230;<\/li>\n<li>PHP <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> method<\/li>\n<\/ul>\n<p> &#8230; today, extending the logic from visually showing &#8230;<\/p>\n<ul>\n<li>HTML <a target=_blank title='HTML img tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_img.asp'><i>img<\/i><\/a> tags &#8230; to, today, extending that to be able to show other media HTML tags &#8230;<\/li>\n<li><a target=_blank href='https:\/\/www.w3schools.com\/html\/html5_video.asp' title='HTML video element information from w3schools'><i>video<\/i><\/a><\/li>\n<li><a target=_blank href='https:\/\/www.w3schools.com\/html\/html5_audio.asp' title='HTML audio element information from w3schools'><i>audio<\/i><\/a><\/li>\n<\/ul>\n<p> &#8230; primarily by mapping URL (web server file) extensions to <a target=_blank title='MIME type information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/MIME'>MIME types<\/a> in order to best attempt to play these media files using those HTML media tag types.<\/p>\n<p>Along the way in the description data column we add links to <a target=_blank title='Google' href='http:\/\/www.google.com'>Google<\/a> searches for pertinent words used by the Linux <a target=_blank title='Linux file command information from computerhope' href='https:\/\/www.computerhope.com\/unix\/ufile.htm'>file<\/a> command to describe the files asked for by the user.<\/p>\n<p>You can try this out for yourself, again, at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php\" title=\"Click picture\">live run<\/a> link with its underlying serverside PHP code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php-GETME\" title=\"file_information.php\">file_information.php<\/a> (that changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php-GETME\" title=\"file_information.php\">this way<\/a>) as you wish.<\/p>\n<hr>\n<p id='phpfipt'>Previous relevant <a target=_blank title='PHP File Information Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-file-information-primer-tutorial\/'>PHP File Information 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\/file_information.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Information Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.jpg\" title=\"PHP File Information Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Information Primer Tutorial<\/p><\/div>\n<p>We channel the great Linux (or Unix) command <a target=_blank title='Linux file command information from computerhope' href='https:\/\/www.computerhope.com\/unix\/ufile.htm'>&#8220;file&#8221;<\/a> to start down the road of a <i>web server file information presenter<\/i> web application.<\/p>\n<p>With Mac OS X (like Linux) command line &#8230;<\/p>\n<p><code><br \/>\nfile [webServerFileSpec]<br \/>\n<\/code><\/p>\n<p> &#8230; sums up what we build a web application around, having a PHP shell use its <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'><i>exec<\/i><\/a> method to filter the information through (Linux command line) with the data columns &#8230;<\/p>\n<ul>\n<li>web server file name<\/li>\n<li>web server file information<\/li>\n<\/ul>\n<p> &#8230; to result in the table contents of our file (specification) table in our web application today.<\/p>\n<p>You can try this out for yourself at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php\" title=\"Click picture\">live run<\/a> link with its underlying serverside PHP code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/file_information.php_GETME\" title=\"file_information.php\">file_information.php<\/a> as you wish.<\/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='#d34305' onclick='var dv=document.getElementById(\"d34305\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/file\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d34305' 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='#d34322' onclick='var dv=document.getElementById(\"34322\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/media\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d34322' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s PHP File Information Primer Tutorial was the start of a web application breakdown of a URL file specification at the rjmprogramming.com.au domain harnessing the talents of &#8230; Linux file command &#8230; called by &#8230; PHP exec method &#8230; today, &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-file-information-media-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,37],"tags":[113,405,418,1615,513,590,760,1668,932,997,2387,1238,1319,1369],"class_list":["post-34322","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-audio","tag-exec","tag-file","tag-glob","tag-google","tag-image","tag-media","tag-mime-type","tag-php","tag-programming","tag-specification","tag-table","tag-tutorial","tag-video"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34322"}],"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=34322"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34322\/revisions"}],"predecessor-version":[{"id":34326,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34322\/revisions\/34326"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=34322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=34322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=34322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}