I wanted to use my own domain name to display a public Dropbox folder. I had no interest in IFrames or HTML framesets so I turned to PHP.
It only takes a few quick lines of PHP to tackle this. First use file_get_contents()
to retrieve the page. Then use html_entity_decode()
to clean up the results. After that, do a str_replace()
to fix all relative URLs. Last but not least, echo the contents to the browser.
$contents = file_get_contents('https://www.dropbox.com/your_dropbox_folder'); $contents = html_entity_decode($contents); $contents = str_replace('="/', '="https://www.dropbox.com/', $contents); echo $contents;