{"id":2492,"date":"2008-01-12T22:53:37","date_gmt":"2008-01-13T05:53:37","guid":{"rendered":"http:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/?p=2492"},"modified":"2008-01-12T21:21:25","modified_gmt":"2008-01-13T04:21:25","slug":"a-saturday-night-toy-your-file-server-as-a-linked-hierarchy","status":"publish","type":"post","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2492\/a-saturday-night-toy-your-file-server-as-a-linked-hierarchy\/","title":{"rendered":"A Saturday night toy: Your file server as a linked hierarchy"},"content":{"rendered":"<p>I owe more &#8220;Speaking in tongues&#8221; stuff, but I think I may have bored everyone to tears. This, by pointed contrast, is purely for fun.<\/p>\n<p>Copy this code:<\/p>\n<pre>&lt;?PHP\r\n$thepath = $_SERVER['SERVER_NAME'];\r\n$dir = '*';\r\nif ($Bfolder) $dir = \"$Bfolder\/*\";\r\n\r\nforeach (glob($dir, GLOB_ONLYDIR) as $filename)\r\n   {\r\n   if (!$Bfolder) echo (\"&lt;BR&gt;\");\r\n   ?&gt;\r\n   &lt;a href=\"&lt;?PHP echo($filename); \r\n   ?&gt;\" target=\"_blank\"&gt;\r\n   &lt;?PHP echo($filename); ?&gt;&lt;\/a&gt;&lt;BR&gt;\r\n   &lt;?PHP\r\n   $URL = urlencode($filename);\r\n   include (\"http:\/\/$thepath\/windex.php?Bfolder=$URL\");\r\n   }\r\n?&gt;<\/pre>\n<p>and paste it into a text file.<\/p>\n<p>Save the file with the name &#8220;windex.php&#8221;.<\/p>\n<p>FTP it into the top level of your file server.<\/p>\n<p>Then go here:<\/p>\n<pre>http:\/\/MyServer.com\/windex.php<\/pre>\n<p>substituting the name of your server for &#8220;MyServer&#8221;, of course.<\/p>\n<p>What are you seeing? The entire directory tree of your file server expressed as links. Each sub-hierarchy of folders is visually separated by a space, just to make things pretty. Each one of those links will work, opening into a web page if the folder contains an HTML &#8220;index&#8221; file, or to a Unix like directory representation if not.<\/p>\n<p>Just a toy, just for fun. I&#8217;d explain it to you, but then you&#8217;d have to kill me.<br \/>\n<!-- technorati tags start --><\/p>\n<p style=\"text-align:right;font-size:10px;\">Technorati Tags: <a href=\"http:\/\/www.technorati.com\/tag\/blogging\" rel=\"tag\">blogging<\/a>, <a href=\"http:\/\/www.technorati.com\/tag\/real estate\" rel=\"tag\">real estate<\/a>, <a href=\"http:\/\/www.technorati.com\/tag\/real estate marketing\" rel=\"tag\">real estate marketing<\/a>, <a href=\"http:\/\/www.technorati.com\/tag\/technology\" rel=\"tag\">technology<\/a><\/p>\n<p><!-- technorati tags end --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I owe more &#8220;Speaking in tongues&#8221; stuff, but I think I may have bored everyone to tears. This, by pointed contrast, is purely for fun. Copy this code: &lt;?PHP $thepath = $_SERVER[&#8216;SERVER_NAME&#8217;]; $dir = &#8216;*&#8217;; if ($Bfolder) $dir = &#8220;$Bfolder\/*&#8221;; foreach (glob($dir, GLOB_ONLYDIR) as $filename) { if (!$Bfolder) echo (&#8220;&lt;BR&gt;&#8221;); ?&gt; &lt;a href=&#8221;&lt;?PHP echo($filename); ?&gt;&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,6,5,19],"tags":[],"class_list":{"0":"post-2492","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-blogging","7":"category-marketing","8":"category-real-estate","9":"category-technology","11":"no-featured-image"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3122,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/3122\/truliatrackingphp-keeping-track-of-the-truliacom-nofollow-controversy-with-a-widget-for-the-rest-of-us\/","url_meta":{"origin":2492,"position":0},"title":"TruliaTracking.php: Keeping track of the Trulia.com nofollow controversy with a widget for the rest of us","author":"Greg Swann","date":"May 14, 2008","format":false,"excerpt":"Using Eric Bramlett's green ribbon and a little bit of PHP, I have built a small widget to keep track of the accumulating body of weblog posts on Trulia.com policy of adding the \"nofollow\" tag to links back to its listing partners. Shown below is an image of the widget;\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2438,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2438\/speaking-in-tongues-dynamically-updated-lists-of-links-in-php\/","url_meta":{"origin":2492,"position":1},"title":"Speaking in tongues: Dynamically updated lists of links in PHP","author":"Greg Swann","date":"December 28, 2007","format":false,"excerpt":"Let's get dynamic, shall we? There are a lot of things you can say about PHP -- and some of them are even safe for work. But, at bottom, PHP is a working stiff's programming language for producing dynamic web pages. What's a dynamic web page? It's a page that\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2465,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2465\/speaking-in-tongues-for-morgan-brown-a-quick-and-dirty-contributors-blogroll\/","url_meta":{"origin":2492,"position":2},"title":"Speaking in tongues for Morgan Brown: A quick and dirty contributors&#8217; blogroll","author":"Greg Swann","date":"January 3, 2008","format":false,"excerpt":"I know I promised to do nothing but \"includes,\" and we'll come back to those soon, but here is a real PHP routine, doing an actual real world job. What does it do? For a multi-author weblog like BloodhoundBlog, it produces a blogroll of the contributors' weblogs or web sites.\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3248,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/3248\/speaking-in-tongues-parsing-structured-data-on-the-fly\/","url_meta":{"origin":2492,"position":3},"title":"Speaking in tongues: Parsing structured data on the fly","author":"Greg Swann","date":"June 19, 2008","format":false,"excerpt":"This is not ProjectBloodhound material, at least not first semester stuff. But if you find yourself running into highly structured data -- such as the reports from a spreadsheet or a database application -- you have the ability to easily manipulate that data in PHP. This is a simple example,\u2026","rel":"","context":"In &quot;Marketing&quot;","block_context":{"text":"Marketing","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/marketing\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3305,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/3305\/project-bloodhound-speaking-in-tongues-to-whom-am-i-speaking\/","url_meta":{"origin":2492,"position":4},"title":"Project Bloodhound speaking in tongues: To whom am I speaking?","author":"Greg Swann","date":"June 30, 2008","format":false,"excerpt":"I had a lady phone me the other day who would rather have emailed. She was on our Phoenix real estate web site and she couldn't figure out how to email me. In fact, my email address is associated with every post, just like here, but that wasn't obvious to\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1664,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/1664\/what-would-seth-godin-do-probably-not-one-size-fits-all\/","url_meta":{"origin":2492,"position":5},"title":"What would Seth Godin do? Probably not one-size-fits-all . . .","author":"Greg Swann","date":"July 16, 2007","format":false,"excerpt":"(I'm waiting for a phone call, which is how Realtors address that awful burden of time that befalls them between birth and death.) Joel Burslem mentioned the What Would Seth Godin Do plug-in today, and Jim Duncan has also written about it recently. I like the idea, I just don't\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts\/2492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/comments?post=2492"}],"version-history":[{"count":0,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts\/2492\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/media?parent=2492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/categories?post=2492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/tags?post=2492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}