468,296 Members | 1,346 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,296 developers. It's quick & easy.

Getting a file via http or evaluating a php file and getting its output

I need to somehow merge two separate web programs written in php
together (from the user's perspective). This solution won't be
perminant, I just need something done quickly. I was thinking of two
different approches.

One would be to download a processed version (modified so it will
create validating html with the page it's being embeded in) of one of
the programs with the other, then just use print to embed it in the
page. I couldn't find out how to get a file via http here
(http://us2.php.net/manual/en/index.php). Sorry if I missed this in
the docs.

The other would be to process the other program and get it's command
line output, and print that.

If there's a better way to this, I'd be glad to hear it :)

Also, I've never written any php before; so sorry if I missed
something obvious to someone who has.
Jul 17 '05 #1
1 1423
Hello,

On 10/25/2004 04:10 PM, Brian Peyton wrote:
I need to somehow merge two separate web programs written in php
together (from the user's perspective). This solution won't be
perminant, I just need something done quickly. I was thinking of two
different approches.

One would be to download a processed version (modified so it will
create validating html with the page it's being embeded in) of one of
the programs with the other, then just use print to embed it in the
page. I couldn't find out how to get a file via http here
(http://us2.php.net/manual/en/index.php). Sorry if I missed this in
the docs.


If your HTTP request is simple, you can do it via fopen(). Now, if it is
complicated envolving authentication, cookie handling, redirection,
proxies, special purpose headers, etc.. you may want to try this class
that can simplify your work retrieving your pages:

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sami Viitanen | last post: by
3 posts views Thread by John Draper | last post: by
11 posts views Thread by Brett | last post: by
2 posts views Thread by Chuck Anderson | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.