Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to Read local CDROM content from web page

by jonadab (Parson)
on Apr 25, 2008 at 12:02 UTC ( #682798=note: print w/ replies, xml ) Need Help??


in reply to Read local CDROM content from web page

As a general rule, web content is not permitted by the browser to do arbitrary things like that on the user's computer, because if it were, any website you visit could pretty much take over your computer, and that would be bad.

You can use an input element with type="file" to allow the user to select and upload an individual file from their computer. But the user gets to pick the file, and the web server only gets sent the one file they pick. Running Perl code on the server, this is absolutely the closest you can get to what you asked for.

If you explore the possibility of client-side applets that utilize a major plugin (e.g., Java), you may find a loophole through which you can slip part of what you need to do. But I would not be surprised if you run into a brick wall in the form of the security model even there.

Of course, if you write your own plugin, it can do more or less whatever it wants -- *if* the user is willing to install it. Which they almost always will not be. This approach can work in certain special situations, e.g., if you're developing a corporate intranet application and the IT department can deploy the plugin on every workstation in the organization. For a website for general consumption, though, it's not going to fly.

Active-X used to be a gaping wide-open security abdication that would allow this sort of schenanighans to be pulled off on MSIE on Windows (if the user clicked the yes button), but due to the obviously unacceptable security problems that created Microsoft has improved their security model over the last several years and this is really no longer workable. Thank goodness.

However, all of that only answers the question you actually asked. Without more background, I can't say for sure, but it's possible that maybe there's some more feasible way to accomplish what your site really needs, without violating the security barriers that protect users from malicious websites. If you explained more about why your website wants this kind of information, maybe there's another way to accomplish the necessary part of what the site actually needs, a way for your site to provide the actual useful features it wants to provide without reading the user's CD-ROM drive.

-- 
We're working on a six-year set of freely redistributable Vacation Bible School materials.


Comment on Re: How to Read local CDROM content from web page
Re^2: How to Read local CDROM content from web page
by Anonymous Monk on Apr 26, 2008 at 07:41 UTC
    Its still workable, but you gotta be black hat , and also exploit flash

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682798]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-12-18 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls