View previous topic :: View next topic |
Author |
Message |
feamsr00 -
Joined: 04 Jun 2002 Posts: 138 Location: Phila PA
|
Posted: Sat Jan 18, 2003 9:00 pm Post subject: html fowarding |
|
|
Does any know how (via php or other) a way to get the contentes of a page on a webserver on a different port and deliver them to the browser (kindof a php-proxy) |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jan 19, 2003 9:20 pm Post subject: Re: html fowarding |
|
|
feamsr00 wrote: | Does any know how (via php or other) a way to get the contentes of a page on a webserver on a different port and deliver them to the browser (kindof a php-proxy) |
You can use the fopen command to open a page on web server:
Code: |
$fp = @fopen("http://www.mysite.com/testfile.html","r");
if ($fp)
{ print"The file exists!"; }
else
{ print"The file does not exist"; }
|
Then use fread to download the contents of the URL as you would do with any file. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
feamsr00 -
Joined: 04 Jun 2002 Posts: 138 Location: Phila PA
|
Posted: Mon Jan 20, 2003 8:28 pm Post subject: |
|
|
humm i did not know fopen worked on webpages. cool! :D
thanks a lot, but 1 more thing, if the page is a form, can you use it? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jan 21, 2003 1:00 am Post subject: |
|
|
feamsr00 wrote: | humm i did not know fopen worked on webpages. cool! :D
thanks a lot, but 1 more thing, if the page is a form, can you use it? |
You'll have to read the PHP documentation for more information. But fopen won't work for POST requests. You should rather use CURL library functions (curl_init, curl_exec, ...) _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|