0

I'm working on an iphone app, that would read pdf files from the folder on web server. I made the part of app which read PDF files and everthing is fine, now i'm trying to figure out how to load all pdf files from http:/www.blabla.com/pdf, so everytime i upload new pdf, the app would automaticly load it.

Is this possibile, and anybody has ideas how can be done?

1 Answer 1

1

This can only be done, by either having Directory Index enabled, or using a server side language such as PHP to read the contents of that folder and output the filenames.

Sign up to request clarification or add additional context in comments.

9 Comments

I think using PHP is better solution. Thanks man, this will not be easy as i tought.
PHP is simple ;) php.net/manual/en/function.scandir.php will simply spit out an array of files/folders in a given folder. You can then use json_encode to convert that to JSON, use Ajax to get the information and go from there ;) Simples...
Hahaha, i know php, and some javascripting, but json, ajax... what? :D Can i simply create an array of files and read it with javascript?
If your using PHP to render the initial page then yes, this can be done. If you are wanting to get the list, after the page has loaded, you would need to look into Ajax.
Oook man, thanks for answers! This got me in right direction to work on!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.