{"id":10459,"date":"2014-10-30T05:02:47","date_gmt":"2014-10-29T18:02:47","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10459"},"modified":"2016-08-20T23:30:00","modified_gmt":"2016-08-20T13:30:00","slug":"phphtmljavascript-file-differences-file-browsing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phphtmljavascript-file-differences-file-browsing-tutorial\/","title":{"rendered":"PHP\/HTML\/Javascript File Differences File Browsing Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php?differences=\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML\/Javascript File Differences File Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/DifferencesFileBrowsing_Primer.jpg\" title=\"PHP\/HTML\/Javascript File Differences File Browsing Tutorial\"  style=\"float:left;\" id='ssqsqqxixi'   \/><\/a><p class=\"wp-caption-text\">PHP\/HTML\/Javascript File Differences File Browsing Tutorial<\/p><\/div>\n<p>Yesterday with <a target=_blank href='#phjmdfbt' title='PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial'>PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial<\/a> as shown below, we continued on with the framework for file browsing with PHP on the web either at the client computer or the web server computer.<\/p>\n<p>Today&#8217;s task, using this same framework, is to use PHP to check for file differences existing, typically, in software code or text files, or in HTML or XML or CSV data files or other types of ascii text files.<\/p>\n<p>As a programmer, we are often interested in what caused a bug, and we often use version control software to help here.  Such version control software would have a similar functionality within its &#8220;bag of tricks&#8221;, to tell you what changed from one version to another.  Here, though, if you have no version control &#8220;wrapper&#8221; you&#8217;d need two distinct files sitting on your hard disk, in the same web server directory, for the top part of the webpage, or a local hard disk pair of files for the bottom part of the webpage, to make use of today&#8217;s functionality.<\/p>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).  And then this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/7852005\/how-to-check-if-a-url-exists-with-php-and-make-it-time-out-after-a-number-of-sec' title='Useful link'>useful link<\/a> helped enormously with the curl usage &#8230; thanks.<\/p>\n<p>Always bear in mind that client-side Javascript can not write to files, unless you think of Cookies as files, whereas server-side PHP usage opens the web world up to many more functionality ideas with files, because you can list, read, and write to files on the server with a server-side language like PHP (or ASP.Net).<\/p>\n<p>Here is our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php?differences=\" title=\"Click picture\">live run<\/a> today that has in it functionality to restrict what you see, to protect this domain here at rjmprogramming.com.au but please know that you can download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php----GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> and get it going in your own environments, and see the full functionality at work.<\/p>\n<p>To see how we got this file differences functionality into the PHP please consult <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php----GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> link showing programming source code differences.<\/p>\n<hr \/>\n<p id='phjmdfbt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10445' title='PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial'>PHP\/HTML\/Javascript Media &#038; Document File Browsing 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\/MediaFileBrowsing_Primer.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MediaFileBrowsing_Primer.jpg\" onclick=\" alert('Sorry, but the access to this service has to be restructured ... sorry for any inconvenience while this issue is worked through.');  \" title=\"PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial\"  style=\"float:left;\" id='qsqqxixi'   onmouseover=' this.src=this.src.replace(\".jpg\",\".PNG\").replace(\".png\",\".BMP\").replace(\".bmp\",\".GIF\").replace(\".gif\",\".JPEG\").replace(\".jpeg\",\".JPG\").replace(\".PNG\",\".png\").replace(\".JPG\",\".jpg\").replace(\".GIF\",\".gif\").replace(\".JPEG\",\".jpeg\").replace(\".BMP\",\".bmp\"); '  \/><\/a><p class=\"wp-caption-text\">PHP\/HTML\/Javascript Media & Document File Browsing Tutorial<\/p><\/div>\n<p>Perhaps you remember when we first discussed PHP uploading functionality, when we created the <a target=_blank href='#apupt' title='PHP Upload Primer Tutorial'>PHP Upload Primer Tutorial<\/a> as shown a long way below.<\/p>\n<p>Believe it or not, when you upload, but don&#8217;t follow through &#8230; <i>oops, a hook this time<\/i> &#8230; you get useful functionality for file browsing (with <i>Browse<\/i> buttons and GUI aspects that look like the dialog boxes of <a target=_blank title='IDE information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment'>IDE<\/a> desktop programs (except we are on the web today)) on your client computer.  This <i>&#8220;truncated&#8221;<\/i> uploading concept represents about two thirds of the functionality of this tutorial, with the other third being a web server (restricted (to protect rjmprogramming.com.au)) file directory traverser, to output a table of file information.   In order to achieve this in PHP we use the <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'><i>glob()<\/i><\/a> method.<\/p>\n<p>An extension of the functionality as above which first popped up with <a target=_blank href='#pupt' title='PHP\/HTML\/Javascript File Browsing Primer Tutorial'>PHP\/HTML\/Javascript File Browsing Primer Tutorial<\/a>, today is that the line count and word count are not very useful for image files nor for media nor document files, so why don&#8217;t we, instead, display images as thumbnails which you can click to display the originally sized image, media as HTML5 <i>audio<\/i> and <i>video<\/i> tag elements and documents (such as PDF) in HTML5 <i>iframe<\/i> elements, but still we don&#8217;t upload, instead making use of <a target=_blank title='Data URLs information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data urls<\/a> for the display of the images, media and\/or documents.<\/p>\n<p>Here is our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MediaFileBrowsing_Primer.jpg\" onclick=\" alert('Sorry, but the access to this service has to be restructured ... sorry for any inconvenience while this issue is worked through.');  \" title=\"Click picture\">live run<\/a> today, building more on yesterday&#8217;s <a target=_blank href='#phjifbpt' title='PHP\/HTML\/Javascript Image File Browsing Primer Tutorial'>PHP\/HTML\/Javascript Image File Browsing Primer Tutorial<\/a>, that has in it functionality to restrict what you see, to protect this domain here at rjmprogramming.com.au but please know that you can download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php---GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> and get it going in your own environments, and see the full functionality at work.  The way this new functionality required links, thought it would be good to add reasonably relevant icons as well, and found <a target=_blank title='Showing Hyperlink Cues with CSS | Ask the CSS Guy' href='http:\/\/askthecssguy.com\/articles\/showing-hyperlink-cues-with-css\/'>Showing Hyperlink Cues with CSS | Ask the CSS Guy<\/a> to be very useful for advice and some icons &#8230; thanks.<\/p>\n<p>There is an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).<\/p>\n<p>Always bear in mind that client-side Javascript can not write to files, unless you think of Cookies as files, whereas server-side PHP usage opens the web world up to many more functionality ideas with files, because you can list, read, and write to files on the server with a server-side language like PHP (or ASP.Net).<\/p>\n<p>To see how we got this extra media and document display functionality into the PHP please consult <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php---GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> link showing programming source code differences (from the dead links scenario of yesterday).<\/p>\n<hr \/>\n<p id='phjifbpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10441' title='PHP\/HTML\/Javascript Image File Browsing Primer Tutorial'>PHP\/HTML\/Javascript Image File Browsing 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\/fileinfotable.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML\/Javascript Image File Browsing Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ImageFileBrowsing_Primer.jpg\" title=\"PHP\/HTML\/Javascript Image File Browsing Primer Tutorial\"  style=\"float:left;\" id='qqxixi'   ' \/><\/a><p class=\"wp-caption-text\">PHP\/HTML\/Javascript Image File Browsing Primer Tutorial<\/p><\/div>\n<p>Perhaps you remember when we first discussed PHP uploading functionality, when we created the <a target=_blank href='#apupt' title='PHP Upload Primer Tutorial'>PHP Upload Primer Tutorial<\/a> as shown way way below.<\/p>\n<p>Believe it or not, when you upload, but don&#8217;t follow through &#8230; <i>oops, a shank<\/i> &#8230; you get useful functionality for file browsing (with <i>Browse<\/i> buttons and GUI aspects that look like the dialog boxes of <a target=_blank title='IDE information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment'>IDE<\/a> desktop programs (except we are on the web today)) on your client computer.  This <i>&#8220;truncated&#8221;<\/i> uploading concept represents about two thirds of the functionality of this tutorial, with the other third being a web server (restricted (to protect rjmprogramming.com.au)) file directory traverser, to output a table of file information.   In order to achieve this in PHP we use the <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'><i>glob()<\/i><\/a> method.<\/p>\n<p>An extension of the functionality as above which first popped up with <a target=_blank href='#pupt' title='PHP\/HTML\/Javascript File Browsing Primer Tutorial'>PHP\/HTML\/Javascript File Browsing Primer Tutorial<\/a>, today is that the line count and word count are not very useful for image files, so why don&#8217;t we, instead, display them as thumbnails which you can click to display the originally sized image, but still we don&#8217;t upload, but instead make use of <a target=_blank title='Data URLs information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data urls<\/a> for the display of the images.<\/p>\n<p>Here is our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture\">live run<\/a> today, building more on yesterday&#8217;s <a target=_blank href='#phjdlpt' title='PHP\/HTML\/Javascript Dead Links Primer Tutorial'>PHP\/HTML\/Javascript Dead Links Primer Tutorial<\/a>, that has in it functionality to restrict what you see, to protect this domain here at rjmprogramming.com.au but please know that you can download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> and get it going in your own environments, and see the full functionality at work.<\/p>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the file <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).<\/p>\n<p>Always bear in mind that client-side Javascript can not write to files, unless you think of Cookies as files, whereas server-side PHP usage opens the web world up to many more functionality ideas with files, because you can list, read, and write to files on the server with a server-side language like PHP (or ASP.Net).<\/p>\n<p>To see how we got this extra image display functionality into the PHP please consult <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> link showing programming source code differences (from the dead links scenario of yesterday).<\/p>\n<hr \/>\n<p id='phjdlpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10431' title='PHP\/HTML\/Javascript Dead Links Primer Tutorial'>PHP\/HTML\/Javascript Dead Links 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\/fileinfotable.php?deadlinks=\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML\/Javascript Dead Links Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/DeadLinks.jpg\" title=\"PHP\/HTML\/Javascript Dead Links Primer Tutorial\"  style=\"float:left;\" id='xixi' onmouseover=' this.src=this.src.replace(\".jpg\",\".PNG\").replace(\".png\",\".JPG\").replace(\".bmp\",\".GIF\").replace(\".gif\",\".JPEG\").replace(\".jpeg\",\".BMP\").replace(\".PNG\",\".png\").replace(\".JPG\",\".jpg\").replace(\".GIF\",\".gif\").replace(\".JPEG\",\".jpeg\").replace(\".BMP\",\".bmp\");   ' \/><\/a><p class=\"wp-caption-text\">PHP\/HTML\/Javascript Dead Links Primer Tutorial<\/p><\/div>\n<p>Yesterday with <a target=_blank href='#pupt' title='PHP\/HTML\/Javascript File Browsing Primer Tutorial'>PHP\/HTML\/Javascript File Browsing Primer Tutorial<\/a> as shown below, we started a framework for file browsing with PHP on the web either at the client computer or the web server computer.<\/p>\n<p>This opens up lots of other ideas related to files and how you might use them.  Today&#8217;s task is to use PHP to check for (<a target=_blank title='Absolute vs Relative links information' ... thanks' href='http:\/\/galleryproject.org\/node\/30992'>absolute<\/a>ly &#8230; chortle, chortle) dead links in a file of URLs or of the URLs existing in HTML or XML or other types of ascii text files.<\/p>\n<p>Dead links can happen for a variety of reasons, some of them not directly the fault of the HTML source, like when a linked to website stops its hosting, or changes its webpage structure.   So it can be beneficial to run something to check for this.  You&#8217;ll see in the PHP code that we use <a target=_blank title='Curl PHP method information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/CURL'>curl<\/a> methods, with a ten second timeout mechanism to check whether a URL is active or not.<\/p>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the file <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).  And then this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/7852005\/how-to-check-if-a-url-exists-with-php-and-make-it-time-out-after-a-number-of-sec' title='Useful link'>useful link<\/a> helped enormously with the curl usage &#8230; thanks.<\/p>\n<p>Always bear in mind that client-side Javascript can not write to files, unless you think of Cookies as files, whereas server-side PHP usage opens the web world up to many more functionality ideas with files, because you can list, read, and write to files on the server with a server-side language like PHP (or ASP.Net).<\/p>\n<p>Here is our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php?deadlinks=\" title=\"Click picture\">live run<\/a> today that has in it functionality to restrict what you see, to protect this domain here at rjmprogramming.com.au but please know that you can download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> and get it going in your own environments, and see the full functionality at work.<\/p>\n<p>To see how we got this extra dead links functionality into the PHP please consult <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> link showing programming source code differences.<\/p>\n<p>Hope there is no relationship <a target=_bkank title=\"?\" href=\"http:\/\/www.youtube.com\/watch?v=4vuW6tQ0218\">here<\/a>?<\/p>\n<hr \/>\n<p id='pupt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10423' title='PHP\/HTML\/Javascript File Browsing Primer Tutorial'>PHP\/HTML\/Javascript File Browsing 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\/fileinfotable.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML\/Javascript File Browsing Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/FileBrowsing_Primer.jpg\" title=\"PHP\/HTML\/Javascript File Browsing Primer Tutorial\"  style=\"float:left;\" id='xixi' onmouseover=' this.src=this.src.replace(\".jpg\",\".PNG\").replace(\".png\",\".jpg\").replace(\".PNG\",\".png\");   ' \/><\/a><p class=\"wp-caption-text\">PHP\/HTML\/Javascript File Browsing Primer Tutorial<\/p><\/div>\n<p>Perhaps you remember when we first discussed PHP uploading functionality, when we created the <a target=_blank href='#apupt' title='PHP Upload Primer Tutorial'>PHP Upload Primer Tutorial<\/a> as shown below.<\/p>\n<p>Believe it or not, when you upload, but don&#8217;t follow through &#8230; <i>oops, a shank<\/i> &#8230; you get useful functionality for file browsing (with <i>Browse<\/i> buttons and GUI aspects that look like the dialog boxes of <a target=_blank title='IDE information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment'>IDE<\/a> desktop programs (except we are on the web today)) on your client computer.  This <i>&#8220;truncated&#8221;<\/i> uploading concept represents about two thirds of the functionality of this tutorial, with the other third being a web server (restricted (to protect rjmprogramming.com.au)) file directory traverser, to output a table of file information.   In order to achieve this in PHP we use the <a target=_blank title='PHP glob() method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'><i>glob()<\/i><\/a> method.<\/p>\n<p>Here is our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture\">live run<\/a> today that has in it functionality to restrict what you see, to protect this domain here at rjmprogramming.com.au but please know that you can download the PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php_GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> and get it going in your own environments, and see the full functionality at work.<\/p>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the file <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).<\/p>\n<p>Always bear in mind that client-side Javascript can not write to files, unless you think of Cookies as files, whereas server-side PHP usage opens the web world up to many more functionality ideas with files, because you can list, read, and write to files on the server with a server-side language like PHP (or ASP.Net).<\/p>\n<hr \/>\n<p id='apupt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3937' title='PHP Upload Primer Tutorial'>PHP Upload 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\/Upload\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP Upload Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Upload\/PHP_Upload_Primer-53of.jpg\" title=\"PHP Upload Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP Upload Primer Tutorial<\/p><\/div>\n<p>Most of us are into downloading, as we thirst for information, and as most of us are the ones lacking the information, we go and download the information, except if we are on an escalator while downloading, when there is a 50\/50 chance of &#8220;up&#8221; to the downloading.   Do you catch my drift, or do you want me to explain the rules of cricket? &#8230; it&#8217;s your choice?!   Thought so &#8230; so let&#8217;s talk about uploading.   Uploading is the process that web managers and content managers do a lot, whereby the information is taken to the repository (or website (database)) where the data is stored ready for somebody to download (or if they are on an escalator (well, you know what I mean)), or just to be part of the website content.<\/p>\n<p>Because uploading requires file manipulation you will not be able to do it with purely clientside code like Javascript, so you will need a serverside language like PHP (spelt PHP backwards, if that is any help).   And please don&#8217;t start sentences with &#8220;because&#8221;, and could you leave out starting them with &#8220;and&#8221; too, if you wouldn&#8217;t mind.<\/p>\n<p>As you can see, am trying to wean myself off Wikipedia, and it is a bit hard to bulk things out, so my apologies for this, and would like to reiterate that apology here then now.<\/p>\n<p>So, on with the <strike>show<\/strike> tutorial <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Upload\/\">here<\/a> where we show you an Upload scenario where people can contribute their own photos to a website presenting a stream of photos as the One Image Page Site notion at this blogsite.   You will notice how PHP code can be used to test things about the file ahead of accepting it, and in this case we restrict people&#8217;s jpg files to 1000000 bytes or less (and did you know that 1mb is not 1000000 bytes, so have a read <a title='1mb' href='http:\/\/www.answerbag.com\/q_view\/730178'>here<\/a>).   To have success you should restrict a lot or monitor a lot, to have a secure website environment.  These are all concerns of CMS systems, and how those CMS systems are set up to function by website administrators and <a target=_blank href='http:\/\/www.youtube.com\/watch?v=eUKADwTqkBQ' title='My apologies'><strike>Bugs Bunny<\/strike><\/a> &#8230; down dog!<\/p>\n<p>Here is a link to some downloadable PHP programming source code which you might like to rename to <a target=_blank title='myjpgupload.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Upload\/myjpgupload.php_GETME'>myjpgupload.php<\/a><\/p>\n<p>Please think of this as a starting point for your further study of uploading and here is a good link for further study &#8230; <a target=_blank title='PHP File Upload advice from w3schools' href='http:\/\/www.w3schools.com\/php\/php_file_upload.asp'>PHP File Upload<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3937' onclick='var dv=document.getElementById(\"d3937\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=64#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3937' 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='#d10423' onclick='var dv=document.getElementById(\"d10423\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=upload\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10423' 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='#d10431' onclick='var dv=document.getElementById(\"d10431\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=PHP\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10431' 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='#d10441' onclick='var dv=document.getElementById(\"d10441\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=image\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10441' 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='#d10445' onclick='var dv=document.getElementById(\"d10445\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=media\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10445' 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='#d10459' onclick='var dv=document.getElementById(\"d10459\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5435\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10459' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday with PHP\/HTML\/Javascript Media &#038; Document File Browsing Tutorial as shown below, we continued on with the framework for file browsing with PHP on the web either at the client computer or the web server computer. Today&#8217;s task, using this &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phphtmljavascript-file-differences-file-browsing-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":[328,421,576,578,652,707,932,997,1319],"class_list":["post-10459","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-diff","tag-file-browsing","tag-html","tag-html5","tag-javascript","tag-linux","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10459"}],"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=10459"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10459\/revisions"}],"predecessor-version":[{"id":24307,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10459\/revisions\/24307"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=10459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=10459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=10459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}