{"id":58486,"date":"2023-03-03T03:01:30","date_gmt":"2023-03-02T17:01:30","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58486"},"modified":"2023-03-01T12:29:01","modified_gmt":"2023-03-01T02:29:01","slug":"php-remote-files-interaction-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-interaction-tutorial\/","title":{"rendered":"PHP Remote Files Interaction Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP Remote Files Interaction Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/php_remote_file_interactive.jpg\" title=\"PHP Remote Files Interaction Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">PHP Remote Files Interaction Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='PHP Remote Files Primer Tutorial' href='#phprfpt'>PHP Remote Files Primer Tutorial<\/a> start to our Remote Files PHP web application is improved today, but not in its <i>essence of operation<\/i>, if you will, by adding HTML <a target=_blank title='HTML form element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_form.asp'>form<\/a> navigation and interaction.<\/p>\n<p>These days with HTML form <a target=_blank href='http:\/\/www.w3schools.com\/tags\/tag_input.asp' title='HTML input tag information from w3schools'>input<\/a> elements we find the use of <a target=_blank href='https:\/\/www.w3schools.com\/tags\/att_input_placeholder.asp#:~:text=Definition%20and%20Usage,the%20user%20enters%20a%20value.' title='HTML placeholder attribute'><i>placeholder<\/i><\/a> attribute <font size=1>(perhaps with <i>title<\/i> attribute augmentation)<\/font> is a better approach to that of using any textbox labelling arrangement.  And we like the use of the <a target=_blank href='https:\/\/www.w3schools.com\/jsref\/event_ondblclick.asp' title='HTML ondblclick event'><i>ondblclick<\/i><\/a> event to, perhaps, save the user some typing by filling in the (input element) textbox value with a version of the <i>placeholder<\/i> ready for the user to tweak or leave as appropriate.  This seemed particularly useful for our input type=url textbox, as the entering of URLs from scratch can be quite tedious, we find.<\/p>\n<p>So please try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/remote_files.php--GETME\">the changed<\/a> into a <a target=_blank title='remote_files.php' href='http:\/\/www.rjmprogramming.com.au\/remote_files.php--GETME'>remote_files.php third draft<\/a> usage of PHP fopen URL <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\" title=\"Click picture\">web application<\/a> it is now apt to show you in use within an iframe below, if that suits better &#8230;<\/p>\n<p><iframe style='width:100%;height:400px;' src=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\"><\/iframe><\/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\/php-remote-files-interaction-tutorial\/'>PHP Remote Files Interaction Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phprfpt'>Previous relevant <a target=_blank title='PHP Remote Files Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-primer-tutorial\/'>PHP Remote Files 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\/remote_files.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP Remote Files Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/remote_files.gif\" title=\"PHP Remote Files Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">PHP Remote Files Primer Tutorial<\/p><\/div>\n<p>If your background is in C programming (and the use of <a target=_blank title='C fopen' href='https:\/\/www.tutorialspoint.com\/c_standard_library\/c_function_fopen.htm'>fopen<\/a> function), you might be amazed at PHP&#8217;s <a target=_blank title='PHP fopen' href='https:\/\/www.php.net\/manual\/en\/function.fopen.php'>fopen<\/a> function&#8217;s talents at opening URLs, as well as &#8220;desktop&#8221; files we <font size=2>(programming citizens of senior years <\/font><font size=1>&#8220;shell we say&#8221;<\/font><font size=2>)<\/font> might have more associated with &#8220;fopen thoughts&#8221;.<\/p>\n<p>Combine this PHP fopen URL talent with <a target=_blank title='PHP preg_match' href='https:\/\/www.php.net\/manual\/en\/function.preg-match.php'>preg_match<\/a> function talent, and you&#8217;ve got a pretty simple paradigm to do pretty sophisticated searches through webpage contents for data of interest.<\/p>\n<p>And so, stumbling upon <a target=_blank href='https:\/\/php-legacy-docs.zend.com\/manual\/php5\/en\/features.remote-files'>this excellent advice<\/a> we were able <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/remote_files.php-GETME\">to tailor a first draft<\/a> into a <a target=_blank title='remote_files.php' href='http:\/\/www.rjmprogramming.com.au\/remote_files.php-GETME'>second draft<\/a> (so far non-interactive) usage of PHP fopen URL <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\" title=\"Click picture\">web application<\/a> you could try for yourself playing around with &#8230;<\/p>\n<p><a style=background-color:yellow; contenteditable=true target=_blank data-status='' ontouchstart=\"this.setAttribute('data-status','mot');\" onmouseout=\"this.setAttribute('data-status','mot');\" onblur=\"this.setAttribute('data-status','mot'); this.click();\" onmouseover=\"this.setAttribute('data-status','mov');\" onclick=\"if (1 == 2) { this.href=this.innerHTML; }  if (this.getAttribute('data-status') == 'mot') { this.setAttribute('data-status','mov'); window.open(this.innerHTML.replace(\/\\&#038;amp\\;\/g,'&#038;'),'_blank'); }\">HTTP:\/\/www.rjmprogramming.com.au\/remote_files.php?url=https:\/\/www.rjmprogramming.com.au\/Contact_Us.html&#038;type=p&#038;ord=2<\/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='#d58473' onclick='var dv=document.getElementById(\"d58473\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/fopen\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58473' 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='#d58486' onclick='var dv=document.getElementById(\"d58486\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/form\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58486' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s PHP Remote Files Primer Tutorial start to our Remote Files PHP web application is improved today, but not in its essence of operation, if you will, by adding HTML form navigation and interaction. These days with HTML form input &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-interaction-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":[176,257,319,1549,4261,418,452,609,3163,617,830,932,2643,4028,997,2167,1319,1345],"class_list":["post-58486","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-c","tag-content","tag-desktop","tag-element","tag-element-type","tag-file","tag-form","tag-input","tag-interaction","tag-interactive","tag-navigation","tag-php","tag-placeholder","tag-preg_match","tag-programming","tag-title","tag-tutorial","tag-url"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58486"}],"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=58486"}],"version-history":[{"count":10,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58486\/revisions"}],"predecessor-version":[{"id":58496,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58486\/revisions\/58496"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}