How do I get text from a website using PHP? -
How do I get text from a website using PHP? -
so, i'm working on php script, , part of needs able query website, text it.
first off, need able query website url, need able text text website after query, , able homecoming text out of function.
how query website , text it?
the easiest way:
file_get_contents()
that source of web page.
you want bit more finish though, curl, improve error handling, , setting user-agent, , not.
from there, if want text only, going have parse page. that, see: best methods parse html php
php website
Comments
Post a Comment