Jump to content

HTTP SEND / LISTENER in php


king.oslo

Recommended Posts

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

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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.