Jump to content

Incoming cURL Requests

Recommended Posts

So I'm working with a dedicated linux box, I'm working on a script that interacts with a 3rd party app. This 3rd party app will, send me a Post cURL where my server handles the request looks up more data and replies as the output. Also in the same script I can POST to the third party app via cURL. I have my script set up correctly but I don't think my server is allowing the incoming cURL request because nothing is going through... I tried the exact same script and put it on a shared hosting server and it worked there.

So my question is, how do I verify that my server is refusing incoming cURL requests and how do I fix that?

Link to comment
Share on other sites

Temporarily change the script so it can process GET requests, then hit the URL through your browser? See if you get the expected response?

That works. My only concern is that maybe my firewall is blocking an external server from doing it.
Link to comment
Share on other sites

There are a few other checks you can make, but not sure your permissions will allow running them if you can't run phpinfo.

Save as curlinfo.php or whatever. It will return either cURL is enabled or cURL is not enabled.


echo 'cURL is '.(function_exists('curl_init') ?: ' not').' enabled';


This one will either return your cURL verison or error if not available.


echo '<pre>';


echo '</pre>';


If your running a windows server, find un-comment this line in your php.ini


Link to comment
Share on other sites

Seems it is enabled:

array(9) {










  string(6) "7.21.0"


  string(17) "i686-pc-linux-gnu"


  string(14) "OpenSSL/0.9.8b"


  string(5) "1.2.3"


  array(17) {


	string(4) "dict"


	string(4) "file"


	string(3) "ftp"


	string(4) "ftps"


	string(4) "http"


	string(5) "https"


	string(4) "imap"


	string(5) "imaps"


	string(4) "ldap"


	string(5) "ldaps"


	string(4) "pop3"


	string(5) "pop3s"


	string(4) "rtsp"


	string(4) "smtp"


	string(5) "smtps"


	string(6) "telnet"


	string(4) "tftp"



I ran the second code.. I was getting a parse error because of the : in the first.

Link to comment
Share on other sites


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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...