t_machine Posted May 29, 2009 Share Posted May 29, 2009 hi, i am writing a script that will give users a few options to post to another server depending on their server setup. So far I have cUrl and fsocket, I know php 5 offers HTTP, does any know how to use that to post to another server? I have tested on a server that has both curl and fsocket disable so I am hoping the HTTP in php 5 will help or if there is any other that would be great. Thanks for any help/guidance Quote Link to comment https://forums.phpfreaks.com/topic/160093-how-to-post-to-another-server-without-curl-or-fsocket/ Share on other sites More sharing options...
.josh Posted May 29, 2009 Share Posted May 29, 2009 dunno how much data you are wanting to allow users to post or the sensitivity of it, but if its small and not sensitive, you could have them xfer by appending a query string to an image request. alternatively, they can xfer via ftp. But it kind of depends on the data/system overall as to what would be most appropriate/ideal. Quote Link to comment https://forums.phpfreaks.com/topic/160093-how-to-post-to-another-server-without-curl-or-fsocket/#findComment-844654 Share on other sites More sharing options...
t_machine Posted May 29, 2009 Author Share Posted May 29, 2009 Thanks for the reply. I will be sending back values in two variables which are encrypted(hash) but they cannot be retrieved via $_GET as the script will not accept anything other than a post. I have added fopen to the list which does work great. Quote Link to comment https://forums.phpfreaks.com/topic/160093-how-to-post-to-another-server-without-curl-or-fsocket/#findComment-844660 Share on other sites More sharing options...
JonnoTheDev Posted May 29, 2009 Share Posted May 29, 2009 Curl works over HTTP by the way. Its the main protocol all web requests are made with. Well most of the time unless you are using a different protocol (https, ftp, etc). As far as I know the only method is via stream_context_create(); fopen(); Quote Link to comment https://forums.phpfreaks.com/topic/160093-how-to-post-to-another-server-without-curl-or-fsocket/#findComment-844795 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.