Posted by yoko on 02/16/07 04:05
That worked no problems. What about cURL is that a good method as well?
Hello Dennis,
> // Get the HTML file
> $html = file_get_contents($url);
> // Reduce it to the contents of the <body> tag
> $body = preg_replace("#^.*<body[^>]*>(.*)</body>.*$#si", "\\1",
> $html);
> // Strip of whitespace at the beginning and the end
> $body = trim($body);
Navigation:
[Reply to this message]
|