cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Embedding a web page into another page

From: Jeff Dunlap <jeff_j_dunlap_at_yahoo.com>
Date: Tue, 2 Dec 2008 15:18:59 +0000 (UTC)

I have embedded a cgi application into a PHP page as follows:

<?php
$remote = fopen("http://127.0.0.1/my_site/DailyComics.cgi", "r");
fpassthru($remote);
?>

Everything looks good, the comics are embedded nicely into my PHP page.

Please note that the cgi does not produce <html>, <head>, <body> tags (since
the PHP application puts them where required).

My questions are:

1) Am I using the correct syntax to embed the cgi into the PHP page?

2) The cgi application is returning the HTTP response below. Is this ok or do
we have to modify something? See below:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Tue, 02 Dec 2008 15:14:32 GMT
Content-Type: text/html
Connection: Keep-Alive
Content-Length: 1054

Thank you very much,

Jeff
Received on 2008-12-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET