{"id":5518,"date":"2018-01-19T19:31:23","date_gmt":"2018-01-19T19:31:23","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/smb4php-a-smb-stream-wrapper\/"},"modified":"2018-01-19T19:31:29","modified_gmt":"2018-01-19T19:31:29","slug":"smb4php-a-smb-stream-wrapper","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/smb4php-a-smb-stream-wrapper\/","title":{"rendered":"smb4php: a smb stream wrapper"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By Victor M Varela<\/div>\n<div class=\"\">on October 15, 2007<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\">\n<p>smb4php is a &#8216;smbclient&#8217; based stream wrapper for PHP to access files and folders shared by an SMB server in a transparent way. You will be able to use fopen, fclose, fwrite, fgets, opendir, readdir, unlink, etc. using an URL &#8220;smb:\/\/user:<a href=\"mailto:pass@server\/share\/path&amp;quot\" target=\"_new\">pass@server\/share\/path&#8221;<\/a>;.\n<\/p>\n<p>Example:<\/p>\n<pre>\ninclude \"smb.php\";\n\n$dir = \"smb:\/\/server\/disk\";\nif(is_dir($dir)) {\n   $dh = opendir($dir);\n   while(($file=readdir($dh)) !== false) {\n       echo \"filename: $file - filetype: \".filetype($dir.'\/'.$file).\"n\";\n   }\n   closedir($dh);\n}\nelse {\n   echo $dir.\" n'est pas un r??pertoire<br\/>n\";\n}\n<\/pre>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>smb4php is a &#8216;smbclient&#8217; based stream wrapper for PHP to access files and folders shared by an SMB server in a transparent way. You will be able<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-5518","post","type-post","status-publish","format-standard","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/5518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=5518"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/5518\/revisions"}],"predecessor-version":[{"id":5656,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/5518\/revisions\/5656"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=5518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=5518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=5518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}