Using cURL or this …
$html = file_get_contents('http://stackoverflow.com/questions/ask');
gets the web page, but it also renders it as a normal web page and I just want the text.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Erm… all
file_get_contentsdoes is get the contents of the file. It only looks like “rendered” HTML because you’re dumping it right into the output stream. Try running it throughhtmlspecialcharsbefore outputting it.