PersonPerson Posted January 28, 2008 Share Posted January 28, 2008 I need to get "http://www.example.com/index.php?do=thing"s full contents and store them and return. Include(), require() don't work. The only method that works is header("Location: "). I need to, somehow, go to the page using header, store it's entire contents, and go back to the script that executed AND continue executing some other code. I've searched plenty with no results. Thanks in advance for your help. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/ Share on other sites More sharing options...
Bauer418 Posted January 28, 2008 Share Posted January 28, 2008 You want to use sockets, not headers. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-450843 Share on other sites More sharing options...
cooldude832 Posted January 28, 2008 Share Posted January 28, 2008 file_get_contents() will get what is the presentation of that given file be it local or global in the sense of another server. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-450846 Share on other sites More sharing options...
PersonPerson Posted January 28, 2008 Author Share Posted January 28, 2008 Already tried file_get_contents() with no success. And could I get an example on how I would use sockets in this situation? I mean, the sending GET data to a file in a host's subdirectory. As far as I could understand, sockets could manage data between hosts, not manage files. Correct me if I'm wrong. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-450860 Share on other sites More sharing options...
PersonPerson Posted January 28, 2008 Author Share Posted January 28, 2008 It would also be worthy to point out that the data has to be parsed via the remote server. The server won't give me the data if it sees http://mySite.com retrieving it. It will only give the data to http://www.example.com, which means I have to access it directly instead of including it or calling it. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-450869 Share on other sites More sharing options...
PersonPerson Posted January 29, 2008 Author Share Posted January 29, 2008 I hate making multiple posts in a row, but this is very important and I see I haven't received any replies. Bumping to see if someone is willing/able to help... Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-452922 Share on other sites More sharing options...
Bauer418 Posted January 29, 2008 Share Posted January 29, 2008 You will need to use sockets and specify the Referer: header to be from http://www.example.com Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-452927 Share on other sites More sharing options...
PersonPerson Posted February 2, 2008 Author Share Posted February 2, 2008 Bump again... I still need help and have no idea about how to do this using sockets. Whatever I've tried has failed. Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-456232 Share on other sites More sharing options...
haku Posted February 2, 2008 Share Posted February 2, 2008 Why don't include() and require() work? Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-456262 Share on other sites More sharing options...
PersonPerson Posted February 3, 2008 Author Share Posted February 3, 2008 I finally managed to get it working using sockets. Thanks, Bauer418! Quote Link to comment https://forums.phpfreaks.com/topic/88115-solved-helpmultiple-redirects/#findComment-456460 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.