Well... maybe you have the paypal domain open but not the sandbox? Are you logged into the sandbox when you test? I think you have to log into sandbox first before doing tests in that session.
The live site uses:
Perhaps one is open for communication and not the other? All of the other code is the same for sandbox and live. The only thing that changes is the url of the page. I see that no response is given at all. That usually means it is blocked at the server level. Otherwise you should at least get a permissions error.
CURL is the way php communicates with remote web sites like paypal. http://php.net/manual/en/book.curl.php