On Thu, 1 Feb 2001, Jared Howard wrote:
> I need to know if there is a way to get a specified HTML page (as if you
> were to go to the page by typing in the url in your browser) and either
> turn it into a string or array or something that I would be able to cut up
> and use the information that I need. This way PHP does the work instead of
> going to the page yourself.
We did this on a project once. Some of our PHP pages were written to be a
back end, so needed to be called *by* other php pages, not included in
them. This was so our designers could do with as little php as possible.
It also allowed us to standardize on an XML abstraction layer between all
pieces of the project.
I'd suggest looking into fsockopen. If you know how, you can set it up to
poke through any corporate firewall you may be using, and if you know the
HTTP spec, you can send anything through the connection, not just HTML.
This technique is often employed by "page strippers" that take info from
other sites, re-parse it for useful information, and make it part of the
current page.
We also used fsockopen to directly connect to pop3 and ftp servers before
the functionality was added in php4.
You'd be amazed what you can learn from an RFC.
--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Programmer |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: [EMAIL PROTECTED] AIM : trifthen |
| Web : hamster.lee.net |
| |
| "Most of our lives are about proving something, either to |
| "ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]