king.oslo Posted September 9, 2009 Share Posted September 9, 2009 Hello my friends, This is what I want to make. Two scripts. 1. user loads index.php. 2. index.php sends some information to check.php (on a different server) by HTTP POST, for example with cURL, 3. check.php then makes sql_query() and returns some information (by HTTP POST) from the database to index.php. index.php prints this information, and the user who executed the script reads the information. Paypal does something along these lines to to verify if a payment was valid or not, but what they do is not identical. I am familiar with cURL, if I can do this with cURL, that be great. Thank you. Kind regards, Marius Jonsson Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/ Share on other sites More sharing options...
trq Posted September 9, 2009 Share Posted September 9, 2009 Cool, now whats your question? Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915205 Share on other sites More sharing options...
king.oslo Posted September 9, 2009 Author Share Posted September 9, 2009 I am sorry if I was not clear 1: Is it possible to make php-code that will do this? 2.a: Can i read about it somewhere? 2.b: (If dunno) Can you suggest some relevant code or functions for me? Thanks Kind regards, Marius Jonsson Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915207 Share on other sites More sharing options...
thewooleymammoth Posted September 9, 2009 Share Posted September 9, 2009 sounds like ajax, however ajax can only be accessed on the same server. Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915211 Share on other sites More sharing options...
king.oslo Posted September 9, 2009 Author Share Posted September 9, 2009 I am aprox 99,99% certain i am not after some ajax, although I think ajax can do something similar, and my knowledge of ajax is average. Paypal does something similar between my and their servers. The HTTP POST from index.php, QUERY on the other server and return answer to index.php has to complete by HTTP POST before the browser starts to print content on the screen. Therefore I do not think it is ajax. Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915216 Share on other sites More sharing options...
thewooleymammoth Posted September 9, 2009 Share Posted September 9, 2009 i remember seeing that in their api, you could always download thier api and try and see if you could figure out what they are doing. but im not sure, im pretty sure it involves Curl Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915218 Share on other sites More sharing options...
king.oslo Posted September 9, 2009 Author Share Posted September 9, 2009 Paypal does this with fsockopen(), fputs() etc. Does anybody know if it is possible to do this with HTTP POST? Sending information from both the scripts are easy, the problem for me is that I do not know how to make index.php wait for a reply, and accept the reply sent from check.php. Please any concrete help would be much appreciated. Thank you for your time, Kind regards, Marius Jonsson Link to comment https://forums.phpfreaks.com/topic/173627-http-send-listener-in-php/#findComment-915449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.