Send push notification app from a php page

Hello

My question is: is it possible to send push notification to an application from a php page (hosted on a remote server or website)? If so, is there a tutorial or something?

The simplest option is to use a 3rd party service which provide an API to send promissory notes and a plugin for PhoneGap. Pushwoosh.com are very good and have examples of code for php. You will need to register for service PN Apple and Google (no extra cost) then give the Panel of Pushwoosh the access key (Google) and your Apple dev password (it will configure the necessary certificates for you).

Tags: PhoneGap

Similar Questions

  • Problem with SENDING Push notifications!

    Portage .apk to .bar (apk2bar) and I need to send push messages to the device (Dev Alpha B)

    but I can´t find code limit and the error of result of the sender.

    This my PHP server sender:

    public function sendNotificationBlackBerry ($registatoin_tokens, $message) {}
    $appid = 4038-8si785997a3eir572168c5f821291rl8a84';
    $password = "Ja50N4Hu1d";
    $boundary = "mPsbVQo0a68eIL3OAxnm";
    $appport = "33664;
    $deliverbefore = gmdate ("Y - m - d\TH:i:s\Z", strtotime ('+ 2 minutes'));

    An array of addresses must be in the form of PIN or "push_all".
    $addresses = ";
    foreach ($registatoin_tokens as $value) {}
    $addresses. = '

    ' ;
    }
    Create a new cURL resource
    $ch = function curl_init();
    $messageid = true (true);

    $data = '-'. $boundary. "\r\n".
    '
    http://www.openmobilealliance.org/tech/DTD/pap_2.1.DTD">

    '
    . $addresses.
    '

    ' . "\r\n".
    '--' . $boundary. "\r\n".
    "Content-Type: text/plain". "\r\n". "
    "Push-Message-ID: '." $messageid. "\r\n\r\n".
    stripslashes ($message). "\r\n".
    '--' . $boundary. '--' . « \n\r » ;

    set the URL and other appropriate options
    curl_setopt ($ch, CURLOPT_URL, "https://pushapi.eval.blackberry.com/mss/PD_pushRequest"); //Erro 2000 code request is not valid.
    curl_setopt ($ch, CURLOPT_URL, "https://cpXXXX.pushapi.eval.blackberry.com/mss/PD_pushRequest"); / / Error CODE: 2000
    curl_setopt ($ch, CURLOPT_URL, "https://pushapi.eval.blackberry.com"); / / not valid end of document
    curl_setopt ($ch, CURLOPT_URL, "https://cpXXXX.pushapi.eval.blackberry.com"); //Invalid end of document

    curl_setopt ($ch, CURLOPT_HEADER, false);
    curl_setopt ($ch, CURLOPT_USERAGENT, "SAA push application");
    curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt ($ch, curlopt_buffersize, CURLAUTH_BASIC);
    curl_setopt ($ch, CURLOPT_USERPWD, $appid. ':' . $password);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($ch, CURLOPT_HTTPHEADER, array ("Content-Type: multipart/related;")) Boundary =". $boundary. "; type = application/xml"," Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q =. 2 "," connection: keep-alive "));

    recovery URL and pass it to the browser
    $xmldata = curl_exec;
    curl_close ($ch);

    //-----------------------------
    Start the analysis of response output and the XML that we can read
    $p = xml_parser_create();
    xml_parse_into_struct ($p, $xmldata, $vals);
    $errorcode = xml_get_error_code ($p);
    If ($errorcode > 0) {}
    $err = true;
    }
    xml_parser_free ($p);

    echo ' Our PUSH-ID: '. $messageid. "
    \n » ;
    If (! $err & $vals [1] ['tag'] == 'PUSH-RESPONSE') {}
    echo ' PUSH-ID: '. $vals [1] ['attributes'] ['PUSH-ID']. "
    \n » ;
    echo ' RESPONSE TIME: '. $vals [1] ['attributes'] ['RESPONSE TIME']. "
    \n » ;
    echo ' response CODE: '. $vals [2] ['attributes'] ['CODE']. "
    \n » ;
    echo ' response DESC: '. $vals [2] ['attributes'] ['DESC']. "
    \n » ;
    } else if ($err) {}
    echo '

    An XML parser error occurred

    ' . "\n";
    echo '
    ' . xml_error_string($errorcode) . "
    \n » ;
    echo '

    Response

    ' . "\n";
    echo '
    ' . $xmldata . '
    ' . "\n";
    } else {}
    echo '

    An error has occurred

    ' . "\n";
    echo ' fault CODE: '. $vals [1] ['attributes'] ['CODE']. "
    \n » ;
    echo ' error DESC: '. $vals [1] ['attributes'] ['DESC']. "
    \n » ;
    echo '
    ' . $xmldata . '
    ' . "\n";
    var_dump ($XMLDATA);
    }
    // -----------------------------

    Return $xmldata;
    }

    Try adding a blank line between the "Content-Type: text/html" line and your actual payload data. It seems that the system expects all the headers to be included in the estate, then a space, then the payload.

  • Push notifications app ID's shows do not

    Hello

    I sent notifications of type push very well until today, NO APP ID are available in the menu drop down.

    I just did a version of our app for android, this would have something to do with it?

    No, nothing shows up.

    I know it's only on IOS. Is it because they have both the same product id? com.k2snowboarding.F16

    See the attached screenshots.

  • Push notification client

    Hello

    I need to implement pushing a notice in my application. My application is a mobile service provider. Thus, they will send push notifications when there is a new notification be sent. Now, I want to implement in my code, how these notifications can be captured or received. Are there examples of code for this? or how to do this? can anyone help?

    Thank you

    Here is the example:
    https://github.com/BlackBerry/Cascades-samples/tree/master/pushCollector
    the article about this here:
    https://developer.BlackBerry.com/Cascades/documentation/device_comm/push/developing_a_push_enabled_a...

  • How to deploy Push Notification plugin for PGB CLI 6.3.0 Server and Client?

    Hello friends, I want to deploy the plug-in can push notification app, compiled by PGB CLI 6.0. But suggest to many doubts after reading the documentation... example: how to get the ID register which is located on the client side in mobilies? or you do not need this ID? If anyone has a site with step a step to set up the server and the application, please post the link here... I'm full of doubts... Thank you very much.

    Here is a detailed tutorial of the push plugin.

    Here's how to set up your credentials when you use PhoneGap Build.

  • Push Notification

    Push notification is enabled in the production environment of DPS 2015? How we test it? It also works well iOS and Android?

    Hello

    Yes it is enabled. Push is available for iOS

    Digital Publishing Solution helps | Send push notifications

    -Klaasjan

  • PHP push notification - type registration

    Hello
    I need to send notification messages to peripheral bb10 using my server PHP script. I used the form of evaluation of the BlackBerry Push Service to register, select BlackBerry Internet Service transport for growth and Essentials of push Blackberry as Service Push type.

    I checked the posts, which one who seems to have been resolved (http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Problem-with-SEND-Push-Notificati... and making all kinds of changes to the data to be sent and headers, but not luck: push server does not respond (curl_exec is false) and attempt to parse the xml ends with error)
    An XML parser error occurred
    End of the invalid document

    The sent data now have the form:
    $data = '-'. $boundary.
    '
    http://www.openmobilealliance.org/tech/DTD/pap_2.1.DTD">




    ' .
    '--' . $boundary. "\r\n".
    "Content-Type: text/plain". "\r\n". "
    "Push-Message-ID: '." $messageid. "\r\n\r\n".
    stripslashes ($message). "\r\n".
    '--' . $boundary. '--';

    And transfer curl options are defined as:
    curl_setopt ($ch, CURLOPT_URL, "https://cpXXXX.pushapi.eval.blackberry.com/mss/PD_pushRequest"); (replaced with email of record value xxxx)
    curl_setopt ($ch, CURLOPT_HEADER, false);
    curl_setopt ($ch, CURLOPT_USERAGENT, "SAA push application");
    curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt ($ch, curlopt_buffersize, CURLAUTH_BASIC);
    curl_setopt ($ch, CURLOPT_USERPWD, $appid. ':' . $password); (replaced appid and password with the values of the registration email)
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_HTTPHEADER, array ("Content-Type: multipart/related;")) Boundary =". $boundary. "; type = application/xml"));

    2 attempted to use javascript to POST XMLHttpRequest in a page on the same server. The result was:
    XMLHttpRequest does not load https://cpxxxx.pushapi.eval.blackberry.com/mss/PD_pushRequest. No "Access-Control-Allow-Origin" header is present on the requested resource. So, the original 'http://my_server_address' is not allowed access.

    3. I used the same code XMLHttpRequest in webworks launched from z10 camera app (the code can be found here - https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/pushCaptureBasics/pushInitiator) and
    Here is the result:

    .. .and the Capture application seems to take notice, by launching again push (does not display the message, but it's another thing ).

    The only thing that now comes to my mind, it is that the push server does not accept my server push messages. But how do I solve this problem?
    Any guidance is appreciated.

    Well, glad to have found a solution to this: after obtaining the references of Production Service Push BlackBerry have used their and it actually works with this code here http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Cannot-send-PHP-Push-message-usin...

  • Sending of the Push Notifications with Adobe DPS

    Issue.

    I test all the DPS from Adobe and Apple options. And one of the things I'd like to test Push Notifications.

    I followed the guide iPad edition to be able to get all certificates, so it's ok. Then, I was looking for a way to send

    push notifications. Because Adobe DPS really doesn't have a user interface environment (Please correct me if I'm wrong ;-) grow us

    notifications, should I do it "by hand". When I tested my app on my iPad I got the ' name of the application wants to send you push notifications "

    so I don't know that my certificates work. Now, I just need to send a push message.

    So I followed this tutorial:

    http://www.raywenderlich.com/3443/Apple-push-notification-services-tutorial-part-12

    I was able to do everything and was able to send a push... but I never received it. And the reason for this is because

    I don't have the token device app, which is a serial number of 64 characters that acts as your address app. So I have no way to send the notification

    to my particular App (which is a sideload app multifolio test).

    Because the DPS from Adobe's cloud based you get no code (which I love). But I think that is currently to stop me

    to discover my token device.

    I ask:

    -Does this mean that I can't send a push notification to Adobe DPS created applications?

    -If this is supported somehow, I guess that (even once, correct me) I need the token device app for the application is created. Where can I get this?

    Thank you!

    For now, it is not possible to manually push notifications. When you activate the push, publishing only a new folio shows the Red badge. At some point, when to push third-party is supported, manual push will be possible.

  • Not able to receive a Push Notification with App ID: 4531-* a76s4

    Hello

    I'm new to the Blackberry development,

    I signed up with the service to Push Black berry assessment

    and received the AppID as: 4531-* a76s4,.

    I used this App ID to test Push notifications for my sample Application,

    can I use the same ID App for multiple Applications to receive Push Notifications,

    because I can't register a new ID app for my other applications,

    Please suggest on this.

    Credentials EVAL, you can use the same credentials to push without much concern.

    However in general for PROD you wish to push single credential by application to avoid accidentally sending a big boost for an application to several applications. And since you want to PROD unique credentials for each application (except if you share them grows) then you can go as well with unique EVAL references as well.

    Why are you unable to save of new credentials to push for your second app?

  • Push Notifications for App shared accounts?

    I know to push Android is not supported at the moment, but if I use a single app account and using the same sheets for Android and iOS there will be a weirdness when I send a push notification?

    In other words, if both Android and iOS apps use the same app account, push still working for iOS and appear just not on Android?

    Thank you!

    Yes, that'll be fine.

    Neil

  • can I use Firefox to receive and send emails from my web page? If so, how do I configure this?

    How to receive e-mails from my web page? Can I implement this using Firefox or I need something like Internet Explorer?

    Firefox is a browser. Internet Explorer is a browser, even Opera, Google Chrome or any other browser. They don't normally have an e-mail client.

    So what you need to do is to open an account with a Web freebie like hotmail.com or gmail.com email provider and then use Firefox to open it with. The emails that you receive or send remain on the e-mail server of the provider. You must use a browser to access only with.

    It is not all browsers that can act as a storage system for e-mails. In this respect the browsers like Firefox, Opera, Internet Explorer etc., is only spectators.

  • How to convert a document pages in macbook air so that when I send to someone directly from my mac, they can open in their computer windows laptop?

    How to convert a document pages in macbook air so that when I send to someone directly from my mac, they can open in their computer windows laptop?

    Depends on. The receiver has Microsoft Word

    If so, open the document, and in the top menu bar, tap Share > Send a copy > Mail > Word > next... and follow the instructions.

    Hope this helps,

    -End

  • BlackBerry app Push Notifications using PushWoosh does not receive notifications when closed and in the background

    I'm developing an application of crossed with phonegap and Jquery mobile platform. I'm trying to implement push notifications for the blackberry application using PushWoosh.

    I noticed that I'm not able to receive notifications when the application is in the background, or when it is closed. I get notifications only when the application is in the foreground.

    Any suggestions on this problem?

    I can use all the help.

    The app is a phonegap application Webworks.

    Thank you.

    Info:

    PhoneGap 2.8.0

    jQuery 1.9.1

    jQuery 1.3.1 Mobile

    SDK WebWorks

    PushWoosh

    Hello

    We just push our BB HTML5 / Webworks sample to our github repo:

    https://github.com/shaders/push-notifications-SDK/tree/master/SDK%20Sample%20Projects/BlackBerry-htm...

    Team Pushwoosh

    www.pushwoosh.com

  • Get a Push notification on app without head and application

    Hello

    I have included an app without a head for my current application, because I am handling becomes class PushService when push comes this application without a head. But I pushservice in running my application also to get called when comes to push, and my request for traffic not called when the push... How can I get push notifications in both without head and noraml app.

    You can take a look at the documentation
    https://developer.BlackBerry.com/native/documentation/Cascades/device_platform/headless_apps/

  • IOS app do not compile in phonegap build after adding support for Push Notifications

    As the title says, I have an app for android and iOS using phonegap to build and push-plugin to the repository of the NPM. It worked perfectly for android, but for iOS, the events have not fired. Then I read that the AppID should have the active possibility of push notifications, so I added a development certificate and certificates and files of mobile provision changed.

    After that, the application is not compile more. I also added a certificate SSL Production to my App ID and certificate and files available mobile since I read the development of those who do not work with Phonegap, built on an old post, but that no longer works.

    Am I missing a step to make it work for the iOS with Phonegap Build? Thanks in advance

    Looks like commissioning your profile does not include your developer certificate. Try re-creating your provisioning profile.

    Maybe useful post:

    IOS create problem certificate does not match profile

Maybe you are looking for