473,566 Members | 3,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1579
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2525
by: Philip Ronan | last post by:
OK, here's my 2p worth: === Q. Why am I getting the error message 'Headers already sent'? A. PHP produces this error message when you try to set a header for a web page after you have already started sending out the content of the page. Web content is always delivered with a few headers at the top, ending with a blank line. For...
1
2500
by: Sami Viitanen | last post by:
Hello, I'm using os.popen and read for reading command input to string but the string doesn't contain the same output that running the command manually or with os.system contains. with os.system: cvs server: Diffing //Project1 File //Project1/testiware.txt is new; current revision 3.13 File //Project1/what_is_version_control.txt is new;...
3
3143
by: John Draper | last post by:
I am having a lot of problems trying to get a Python CGI to run. I have included 3 parts... 1) A simple stripped down python module. 2) An output of what I get when I do: python index.py (which not suprisingly should generate HTML output, and it does) 3) And the "error_log" output from the "server error" I get when I run it by typing...
11
1951
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This is different from what I am seeing. If I right click on a message link and select "copy shortcut", I can paste this link into my browser. This...
3
1282
by: sp | last post by:
hai i have got 1. an xml file 2. an xsl file and my xsl file filters the xml based on attribute value and the output i receive is in the ordinary format
0
3700
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) : base(message){} public FtpException(string message, Exception innerException) : base(message,innerException){}
1
12296
by: John Bailo | last post by:
This is a my solution to getting an Output parameter from a SqlDataSource. I have seen a few scant articles but none of them take it all the way to a solution. Hopefully this will help some poor soul. Situation: I want to do a lookup using a stored procedure for each value in a Row within a GridView. I use a lookup function in my...
2
4100
by: Chuck Anderson | last post by:
I am trying to use ImageMagick to create thumbnails on the fly - without having to save the image to a file. I have gotten it to work by using passthru($cmd, $retval), but I want to use something else that will give me the complete output returned as a string that I can convert to a GD lib image resource so I can verify the operation worked...
4
13523
by: Tobiah | last post by:
I am not sure how to capture the output of a command using subprocess without creating a temp file. I was trying this: import StringIO import subprocess file = StringIO.StringIO() subprocess.call("ls", stdout = file)
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.