If I understand your post correctly, you're fopen()-ing the frame page using the HTTP protocol (as in you're specifying the URL instead of a local file path - although in either case, you're going to end up with exactly the same results). You read in the content but its not parsing the frame pages as you are expecting. This sound like what you're trying to do?
It sounds like you're goal is to process the child frames, but it appears the problem is you're expecting the child frames to be available when using fopen() on the parent frame definition HTML page.
Because the way frames work, the browser loads each frame individually as its own web page. As far as the page itself is concerned, JavaScript has some ideas that its in a frame, but thats about it. When you request the frame definition page, all fopen() will retrieve is the HTML for that page. Fopen() doesn't know there's 3 frames that need to be retrieved as well (although browsers do know that when there's a frame, they have to load another page). Even if you grab the 3 pages individually, you'd have to write them back to disk before the browser retrieved them since PHP can't feed 3 frame children to the browser at the same time.
The only thing I can think of is to pass the parse data to the individual frames and have PHP code for each frame drop in the data you passed to it. I can't really think of a graceful way to do this with frames.
Can you live without frames?