wpervaiz Posted October 18, 2008 Share Posted October 18, 2008 ok, guys, i have a problem. I have a php script that logs into a third party ssl "https" server, constructs a URL for a file download. I need to know if it is possible to download the file locally onto my server, and then display it to the user from my server. If i construct the URL, and direct link it to the user, the user isn't able to access it since he isnt logged into the ssl website (i.e. only me server is) - so since my server is logged in, i want it to download the file, so the user will be able to access it without logging in. The URL is something like: https://www.abc.com/x/y/z/1 -----> this URL gives me a PDF file if im logged in. Hope this makes sense. Any help would be appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/129015-download-remote-file-to-server-php/ Share on other sites More sharing options...
Minase Posted October 18, 2008 Share Posted October 18, 2008 look here http://www.weberdev.com/get_example-4726.html Link to comment https://forums.phpfreaks.com/topic/129015-download-remote-file-to-server-php/#findComment-668824 Share on other sites More sharing options...
wpervaiz Posted October 18, 2008 Author Share Posted October 18, 2008 thanks, but i've already tried that. it doesnt work with https... for starters, i think it should use port 443 instead of 80 I also tried changing the headers somewhat, but it still doesnt work. I'm not sure if im making enough changes Link to comment https://forums.phpfreaks.com/topic/129015-download-remote-file-to-server-php/#findComment-668828 Share on other sites More sharing options...
corbin Posted October 18, 2008 Share Posted October 18, 2008 Would be easiest to do it with cURL, since plain sockets with SSL are going to be a bitch. Link to comment https://forums.phpfreaks.com/topic/129015-download-remote-file-to-server-php/#findComment-668837 Share on other sites More sharing options...
wpervaiz Posted October 24, 2008 Author Share Posted October 24, 2008 for some reason, using curl forwards me to the file ... if im logged into the site, i'm shown the file, if im not logged in, it asks me to log in ... curl doesnt download the file ! Link to comment https://forums.phpfreaks.com/topic/129015-download-remote-file-to-server-php/#findComment-674008 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.