I am building a web app , I want the ability to read or fetch data from CD ROM via php.
You don’t. It is HIGHLY unlikely that your server would have an optical drive and even if it did, it isn’t like someone will be watching. Why would you use a CD as media in the first place?
I’d go on a limb and guess it’s the optical drive of the clients computer he wants to access. If so then you can’t in PHP as PHP runs on the server and not in the clients browser. And while you can run code in the clients browser it’s (thankfully) sandboxed to avoid things like fiddling with the local file system. If you were actually talking about the optical drive of the server then just ignore me ^^