html fowarding

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
feamsr00
-


Joined: 04 Jun 2002
Posts: 138
Location: Phila PA

PostPosted: Sat Jan 18, 2003 9:00 pm    Post subject: html fowarding Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jan 19, 2003 9:20 pm    Post subject: Re: html fowarding Reply with quote

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 View user's profile Send private message Send e-mail
feamsr00
-


Joined: 04 Jun 2002
Posts: 138
Location: Phila PA

PostPosted: Mon Jan 20, 2003 8:28 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jan 21, 2003 1:00 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group