tags:

views:

14

answers:

1

Hello,

I am parsing the source code of a web page like this:

    private function readPage() {
        header("Content-type: text/plain"); 
        $this->pageSource = @readfile ($this->page);    
    }

But it seems as if I can't assign the content into the "pageSource" variable. Where it my mistake?

Thanks a lot for your help.

+2  A: 

readfile() reads a file and outputs it to STDOUT. I think you're probably looking for file_get_contents().

Daniel Egeberg
That's exactly what I was looking for! Thank you.
Forlan07