# Don't process my fopen()/fread()

**URL:** https://forum.kirupa.com/t/dont-process-my-fopen-fread/233020
**Category:** Uncategorized
**Created:** [July 19, 2007, 2:16pm UTC](https://forum.kirupa.com/t/dont-process-my-fopen-fread/233020 "2007-07-19T14:16:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mlk](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mlk](https://forum.kirupa.com/u/mlk)
#### Post date: [July 19, 2007, 2:16pm UTC](https://forum.kirupa.com/t/dont-process-my-fopen-fread/233020/1 "2007-07-19T14:16:58Z")

</div>

Hello. I’m trying to build a php sandbox with a small UI from [http://codepress.org/](http://codepress.org/)

however I’ve encountered a small problem, when I fetch the php pages I want to edit thru fopen() they naturally come out processed. Is there anyway I can have them in clear ? as if they were .txt files ?

```php

$file = "http://mysite.com/myfile.php";
$fp = fopen($file,'r') or die('Failed to open');
$contents = fread($fp,filesize($file));
fclose($fp);
//code to display $contents

```

I know it’s a huge security hole but I’m only using it on local server with proper protections. I have a feeling what I want to do is against php’s base design

cheers

mlk
