I've never done this before so I'm completely in the dark. I'm using PHP and I need to call a SOAP service running on a remote server that responds to a call with a status code. How exactly do I make a call? The service is running on a specific ip/port and it has a name, ie: http://1.2.3.4:1000/ServiceName?1234 where 1234 is a parameter I'm passing and for which I expect an answer from the service.
Please give me a few guidelines, thanks!
Assuming you have allow_url_fopen on (usually true), it may be as simple as...
$response = file_get_contents('http://1.2.3.4:1000/ServiceName?1234');
For very simple request/response sets, you can basically do
$response = file_get_contents('http://1.2.3.4:1000/ServiceName?1234');
If you need to do anything "special", like authenticate to the server, log in, process cookies, etc... you'd be better off using cURL instead, or look at the streams wrapper stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With