BassemN Posted October 2, 2015 Share Posted October 2, 2015 Hello, How can I make a get call using curlCall method? Thanks 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 2, 2015 Share Posted October 2, 2015 Explain your request further maybe 0 Quote Link to comment Share on other sites More sharing options...
BassemN Posted October 2, 2015 Author Share Posted October 2, 2015 Hello Sentq, Thanks for your interest. I used curlCall to make requests to a third party. When I use curlCall to make a GET request, I received an error that I must use GET not POST to make the request. Thanks 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 2, 2015 Share Posted October 2, 2015 You can specify the parameter in the URL field instead of defining them as an array, for example: this is the regular CurlCall as you call it, it will send parameters as POST request: <?php $url = 'http://www.whmcs.com/'; $postfields = array( 'a' => 'b', 'c' => 'd', etc... ); #$options = array( 'CURLOPT_TIMEOUT' => '300', 'HEADER' => 'xxxxx' ); # Optional $response = curlCall($url,$postfields,$options); We can change it to use GET like the following: $url = 'http://www.whmcs.com/?a=b&c=d&e=f'; $options = array( 'CURLOPT_POST' => 0 ); $response = curlCall($url,$postfields,$options); - - - Updated - - - now I understand by "get call" you mean "GET Request" 0 Quote Link to comment Share on other sites More sharing options...
BassemN Posted October 2, 2015 Author Share Posted October 2, 2015 Thank you very much. It is working well 0 Quote Link to comment 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.