Hi,
I have written a script that uses fsockopen, fputs, and fgets to send http GET headers to a web site and receive the resulting content. Everything is working fine so far.
My problem: Lets say my script is named "test.php", and the full url of the script that I enter in my browser is "http://my.webserver.net/test.php". In the script, I establish a connection to some web server using fsockopen. I then use fputs to send HTTP GET headers to the web server, and fgets to receive the web server's response. This response includes headers & content, which I am seperating properly. I am then able to display this content within my web browser. However, the URL in my browser's address bar does not change from the original "http://my.webserver.net/test.php". In addition, some of the relative links on the content I retrieved from the other web server are broken, because they are now relative to MY webserver, not the server I retrieved the content from. Does anyone know of a way to remedy this problem?
My ultimate goal here is to implement a sort of "single signon". I've figured out basic authorization and form posts, but I can't go much further until I work out this problem. Any input is appreciated.
Thanks!