Like push-notification(downstream message), I want to implement upstream messaging from my android device to my app server in php.
I am using this XMPPHP library from Github to connect my app server to GCM's CCS. But when I try to execute below code to connect GCM's CCS:
include 'XMPPHP/XMPP.php';
$conn = new XMPPHP_XMPP('gcm-preprod.googleapis.com', 5236, '<myProjectId>@gcm.googleapis.com', '<myApiKey>', 'xmpphp', 'http://myserverdomain', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_INFO);
$conn->autoSubscribe();
$vcard_request = array();
try {
$conn->connect();
...
I am getting following error.
1455354076 [INFO]: Connecting to tls://gcm-preprod.googleapis.com:5236 1455354106 [ERROR]: Could not connect. Could not connect before timeout.