Let custom module access private files via file_get_contents I have a custom module (Drupal 7) where I want to read the contents of a file using file_get_contents($file) in the private directory. Theres a access denied error, as the module accesses as anonymous. 

I can access the file via browser via the url created with file_create_url(), but gain no access from my module.

Is there a way to grant my module the permission to open files?
Any other ideas are welcome, too. 

Thanks, Marc
"Use the file system path rather than the url" - Thanks @Clive, this is the solution.