I have installed a wamp server on my laptop that can be accessed locally and from internet. The domain name is educirajse.com and it points to my IP address 95.180.202.54:81. The http request are forwarded through 2 routers to my local static ip address: 192.168.1.130. My web server is accessible via browser through internet but when I try to access some scripts with CURL from another web server I receive error 28 - connect timed out. I used two different web servers and the situation is the same! The interesting thing is that CURL works locally on WAMP, for example I am able to make payments with paypal and payza via CURL from my WAMP web server, but when I try to send a CURL request from another web server to my wamp web server then I always receive connect timed out or couldn't connect to host...! I tried disabling the firewal but to no avail...! Here is an example script that fetches a web page, but unfortunately is not able to fetch my web site hosted on educirajse.com through my wamp web server! It fetches all other pages, but not the page hosted on my wamp web server and there is nothing in the error log or access log...!
So, why my WAMP server does not receive CURL request from internet, but receives them locally???
<?php
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://educirajse.com:81");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT,"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 " );
curl_setopt($curl, CURLOPT_TIMEOUT, 100);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_VERBOSE,true);
$res=curl_exec ($curl);
var_dump( curl_getinfo($curl)) . '<br/>';
echo curl_errno($curl) . '<br/>';
echo curl_error($curl) . '<br/>';
echo $res;
curl_close ($curl);
?>