{"id":58499,"date":"2023-03-04T03:01:42","date_gmt":"2023-03-03T17:01:42","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58499"},"modified":"2023-03-02T07:36:05","modified_gmt":"2023-03-01T21:36:05","slug":"php-remote-files-containing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-containing-tutorial\/","title":{"rendered":"PHP Remote Files Containing 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 Containing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/php_remote_file_containing.jpg\" title=\"PHP Remote Files Containing Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">PHP Remote Files Containing Tutorial<\/p><\/div>\n<p>Up until yesterday&#8217;s <a title='PHP Remote Files Interaction Tutorial' href='#phprfit'>PHP Remote Files Interaction Tutorial<\/a> &#8230;<\/p>\n<ul>\n<li>there could only be at most one record of matching results presented &#8230;<\/li>\n<li>if an element type was not supplied we defaulted to a <i>title<\/i> element type as a basis for search of URL content<\/li>\n<\/ul>\n<p> &#8230; but, today, if we were to <i>tip our toes<\/i> into the making of the PHP <a target=_blank title='PHP preg_match' href='https:\/\/www.php.net\/manual\/en\/function.preg-match.php'>preg_match<\/a> function be more meaningful, then we could &#8230;<\/p>\n<ul>\n<li>ask for a <i>Containing []<\/i> textbox data item &#8230;<\/li>\n<li>if that <i>Containing []<\/i> was not blank and the element type was blank, we could then think of the <i>Number [1]<\/i> data item as then meaning &#8220;number<font color=blue>ing up to<\/font>&#8221; (and if default 1 supplied, mean, &#8220;limitless&#8221;)<\/li>\n<\/ul>\n<p> &#8230; to facilitate sets of matching records presented.<\/p>\n<p>In our current logic we&#8217;ll think more about ongoing, perhaps, the <i>Containing []<\/i> might be best thought about as <i>Ending With []<\/i> because we throttle the matching according to a &#8220;&lt;\/&#8221; <i>end of innerHTML type of element<\/i> finding paradigm in our logic, but if you are into arcane preg_match work, please feel free to try out your preg_match regular expression pattern matching skills within your form&#8217;s <i>Containing []<\/i> textbox in  <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> you can also <a href='#ifrf'>try in iframe below<\/a>, if that suits better.<\/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-containing-tutorial\/'>PHP Remote Files Containing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phprfit'>Previous relevant <a target=_blank title='PHP Remote Files Interaction Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-interaction-tutorial\/'>PHP Remote Files Interaction 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 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 id=ifrf 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<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='#d58499' onclick='var dv=document.getElementById(\"d58499\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/preg_match\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58499' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Up until yesterday&#8217;s PHP Remote Files Interaction Tutorial &#8230; there could only be at most one record of matching results presented &#8230; if an element type was not supplied we defaulted to a title element type as a basis for &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-containing-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":[176,4262,257,319,1549,4261,418,452,609,3163,617,830,2687,4263,932,2643,4028,997,1040,1043,2167,1319,1345],"class_list":["post-58499","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-c","tag-containing","tag-content","tag-desktop","tag-element","tag-element-type","tag-file","tag-form","tag-input","tag-interaction","tag-interactive","tag-navigation","tag-pattern","tag-pattern-matching","tag-php","tag-placeholder","tag-preg_match","tag-programming","tag-regex","tag-regular-expression","tag-title","tag-tutorial","tag-url"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58499"}],"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=58499"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58499\/revisions"}],"predecessor-version":[{"id":58502,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58499\/revisions\/58502"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}