PHP BB BIS push server works on push_all but not on PIN

Well this time I already develop my client applications,.

and I found this problem when I try to make PHP applications according to http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Push-API-sample-code-needed/td-p/...

When I send the message to the address push_all:

It works great on my device, but when I send the message with the specified PIN address:

once more, the message is blocked by Firewall (THE firewall IS OFF) as MESSAGE NO FIGURE.

This is my code:

';
        }

        // create a new cURL resource
        $err = false;
        $ch = curl_init();
        $messageid = microtime(true);

        $data = '--asdwewe. "\r\n" .
        'Content-Type: application/xml; charset=UTF-8' . "\r\n\r\n" .
        '
        http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
        
        '
        . $addresses .
        '
        
        ' . "\r\n" .
        '--asdwewe' . "\r\n" .
        'Content-Type: text/plain' . "\r\n" .
                //'Content-Encoding: binary'. "\r\n" .
        'Push-Message-ID: ' . $messageid . "\r\n\r\n" .
        stripslashes($message) . "\r\n" .
        '--asdwewe--' . "\r\n";

        // set URL and other appropriate options
        curl_setopt($ch, CURLOPT_URL, "https://pushapi.eval.blackberry.com/mss/PD_pushRequest");
            curl_setopt($ch, CURLOPT_PORT , 443);
            curl_setopt($ch, CURLOPT_SSLVERSION, 3);
            curl_setopt($ch, CURLOPT_CAINFO, getcwd()."\cacert.pem");
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

        curl_setopt($ch, CURLOPT_HEADER, false);
        curl_setopt($ch, CURLOPT_USERAGENT, "My BB Push Server\1.0");
        curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($ch, CURLOPT_USERPWD, $appid . ':' . $password);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $__extra_Headers = array(
            "Content-Type: multipart/related; boundary=asdwewe; type=application/xml",
            "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2",
            "Connection: keep-alive",
            "X-Rim-Push-Dest-Port: ".$appport,
            "X-RIM-PUSH-ID: ".$messageid,
            "X-RIM-Push-Reliability-Mode: APPLICATION"
        );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $__extra_Headers);

        // grab URL and pass it to the browser
        $xmldata = curl_exec($ch);
        if($xmldata === false){
            echo 'Error pada CURL : ' . curl_error($ch)."\n";
        }else{
            echo 'Operasi push berhasil'."\n";
        }

        // close cURL resource, and free up system resources
        curl_close($ch);

        //Start parsing response into XML data that we can read and output
        $p = xml_parser_create();
        xml_parse_into_struct($p, $xmldata, $vals);
        $errorcode = xml_get_error_code($p);
        if ($errorcode > 0) {
            echo xml_error_string($errorcode)."\n";
            $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 'REPLY-TIME: ' . $vals[1]['attributes']['REPLY-TIME'] . "
\n"; echo 'Response CODE: ' . $vals[2]['attributes']['CODE'] . "
\n"; echo 'Response DESC: ' . $vals[2]['attributes']['DESC'] . "
\n"; } else { echo '

An error has occured

' . "\n"; echo 'Error CODE: ' . $vals[1]['attributes']['CODE'] . "
\n"; echo 'Error DESC: ' . $vals[1]['attributes']['DESC'] . "
\n"; } } catch (Exception $e) { var_dump($e->getMessage()); } exit(); // --------------------------------------------------------------------------------------------------------------- ?>

I appreciate any useful message... Thank you for your attention and help

well, I'm a bit confused now...

the problem is already solved without a single change in my code (device and server)...

I think it is a problem of service blackberry... or something else, I don't know... * huff *.

Tags: BlackBerry Developers

Similar Questions

  • Email sent using gmail pop, while on outlook express 6 is checked in to the gmail server sent the file, but not on my express outlook sent folder.

    Original title: problem with outlook express 6 and gmail

    Email sent using gmail pop, while on outlook express 6 is checked in to the gmail server sent the file, but not on my express outlook sent folder.  How can I have email sent appear in Outlook express 6 sent folder.  I put it as pop not imap

    Any suggestions?

    Check in OE under Tools | Accounts | Mail | Properties and ensure that it is not set to IMAP.  It seems to me that if you use IMAP folders.  If it isn't, in addition to the suggestion of Umesh, you can try to go to file | Identities and install a new identity and add your POP3 account and see if it works very well.

    Steve

  • FlvPlayer works with FireFox but not with IE

    Hello

    I created an FLV Player to play remote. FLV movie. It works with Firefox but not with Internet Explorer 6 or 7. In fact, when I test locally on my desktop with local (on my desktop). File FLV movie player works in Internet Explorer. The problem seems to be my Web site, when reading remotely. FLV file, it only works with Firefox.

    Try my Web site with Firefox and IE 6-7 and you will see only works with Firefox. Movie player (right section) to this remote file access: http://www.wikiguitarist.com/wikiguitarist/images/9/9a/CanonFuntwo.flv .

    Since it is a Wikimedia site HTML code is generated from a PHP file. Here is the code that generates the HTML code.

    Of Internet Explorer browser only interpret the tag: < embed >?
    Why IE has problem to play remotely. File FLV and not Firefox?

    Any idea, suggest code, suggest HTLML, action script...?

    Thank you
    Alain



    Hi guys,.

    Thank you very much, Jeckyl, you were right, it seems that only FLASVARS is allowed. Nevertheless, I will try to test if I can pass more than one variable/value less a statement of FLASVARS. For the moment, leaving only a statement of FLASVARS the video works fine with IE and Firefox. I'll do a little cleanup, it is true that my generated HTML code is a bit messy.

    Thanks to WindShadow75 for your answer, now you see it works because I removed the additional declaration of FLASVARS.

    Several guys from tanks, it is appreciated!

    WikiGuitarist

  • Just got 2 of SE. Weather app works on one but not the other.

    Just got 2 of SE. Weather app works on one but not the other. Ideas?

    Drosea,

    Define/describe does not.

    What's the weather App?

  • reCAPTCHA works in IE8, but not in Firefox - missing graphics

    reCAPTCHA works in IE8, but not in Firefox

    All the graphics, the challenge, radio buttons and logo do not appear.

    Make sure that you are not blocking JavaScript.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

    See also:

  • Satellite L40-15B - WiFi works at home but not at school

    My daughter has satellite worked at home and at school: wifi OK, internet OK. The satellite crashed: hard disk failure. Bought a new hard drive.

    I reset the Satellite via the recovery CD. It is now a new clean system with * Windows Vista home premium *. * Wifi works immediately at home. Internet too, but at school with my daughter, the wifi is NOT working anymore.*
    Laptops from other children at school always work with wifi.

    A college of my work told me his sister had exactly the same problem!

    Help!

    Hello

    If the WIFI connection works at home but not at school it has nothing to do with Toshiba. I think that your daughter should ask the administrator of the school what is the problem. Maybe the WLAN requires a certain configuration of TCP/IP or else I n t he know and I think that no one here can answer this question.

    Is that wireless network card is properly installed and works, because you can access the Internet at home.

    Sorry, but everything that s what I can say.

  • Why did the counter works in MAX, but not of Labview?

    Please help, I've been away from Labview for more than 3 months and I'm pretty rusty...

    Last year, I configured successfully NI9401 to measure the period (in seconds) by counting the rising edges of my sensor signal.  Since then, I bought a new PC and loaded all my software inside, including the Labview VI that has worked successfully on the old computer.

    I can see the digital signal using MAX and test for the NI9401 Panel, then, I know that my son and my TTL signal is OK, but nothing except the below error when I try to run the attached VI, happens...  How can I say this VI to search for the signal on channel 14 and MOD3/CTR0?

    Thank you. I'm sure it's a small adjustment... it worked well a few months ago... do not know what the problem is now.

    Thank you

    Dave

    OK, now.  Solved the problem. The vi is fine, but some fragile son have been identified... worked in MAX but not in vi.  Now that the connections have been tightened, it works for both.  Sorry for the inconvenience.

    Dave

  • OCR has worked with xp but not windows 7

    With the help of HP C3180 all-in-One printer and Windows 7, 64-bit.

    OCR has worked with XP but not with 7.  Am I missing something?

    Hello belcanguy

    If scanning with I.R.I.S. only shows the scan to image that says Solution Center? Try I scan a document using the Solution Center and see if you can choose an OCR pdf or RTF document.

  • Why my website slider works in Chrome, but not in Internet Explorer

    Why my website slider works in Chrome, but not in Internet Explorer

    On this page it says IE version 10 uses "animation".

    & then if you look at the examples on this page it shows:

    div {}

    -webkit-animation: myfirst 5 s; / * Chrome, Safari, opera * /.

    Animation: myfirst 5 s;

    }

    So, you will need to do.

    Also, check the CSS3 menu on the left, there "transform 2D" then you should find how to join also CSS3 2D transforms

    I have never used myself these animation properties, but these pages will have the info you need.

  • Spry ToolTip works in IE but not Firefox

    Hello

    I do not understand or cannot know what I did wrong. I created a ToolTip for the manufacture of the last product (diameter of 4 inches (special order) brass water revitalizer) on page: http://www.alivewater.net/order.htm

    It works in IE but not Firefox... I can't understand why... can you help me and see what I did wrong?

    Eternally grateful,

    Starry

    The biggest problem I see with the page is that there is no defined document type.  This means browsers have to guess what validation to use to guess what effects should arrive.  If you click on edit->-> category title/encoding Page Properties, you must define the Document Type (DTD).  I.e. once set DW will define the type of document for you.  You can then save and re-upload your document and we can see if the same problem persists.

  • my site works in IE but not firefox

    This is my web page:
    http://www.Andrew-Leonard.co.UK/Mallorca/Mallorca%20ferns.htm

    It usess css to define the layers and javascript to show and hide layers. It uses a system of dhtml menu by Milonic to run javascript code

    This is part of the code for layers:

    <style type="text/css">
    #Layer01 {position: absolute; left: 300px; top: 50px; z-index:1;}
    ...........
    #Layer33 {position: absolute; left: 300px; top: 50px; z-index:33;}
    </style>

    This is part of the javascript to show/hide layers:

    <script>
    function showlayer(layer){
    var myLayer = document.getElementById(layer).style.display;
    if(myLayer=="none"){
    document.getElementById(layer).style.display="block";
    } else {
    document.getElementById(layer).style.display="none";
    }
    }
    </script>

    It works OK in IE but not firefox

    If you select Web Console of Firefox (Ctrl + Shift + K), it will tell you errors is to find and the line of code that is found on.
    The problem, it seems to have at the front is that IDS are case-sensitive: 'layer02' is not the same thing as "Layer02", for example.

    There may be errors once again it happened, but all current browsers come with tools that needed to rule out any other problem.

    In addition to the Javascript reference: https://developer.mozilla.org/en-US/docs/JavaScript

  • My SWF.flash files sites work on IE but not firefox, help please?

    I have a portfolio built with flash on my new site which works fine with IE, but not firefox, is there an additional coding I have to add to make it appear in firefox?

    This code should work:

    <object data="/userfiles/flash/FINE ART FLASH.swf" type="application/x-shockwave-flash" height="450" id="FlashID" width="700">
    <param name="allowFullScreen" value="true" />
    <param name="loop" value="false" />
    <param name="play" value="false" />
    <param name="scale" value="exactfit" />
    <param name="movie" value="/userfiles/flash/FINE ART FLASH.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <param name="bgcolor" value="#303030" />
    <param name="allowScriptAccess" value="samedomain" />
    <param name="swfversion" value="9.0.45.0" />
    </object>
  • Cluster based popup works in Dev but not as Exe

    Hi all

    I use an old tool TS Popup box to allow the user to enter data in a multicolumn listbox: https://lavag.org/topic/10282-cr-type-sensitive-popup/

    Consist of an invisible cluster containing different types of control which monitors for events click on multicolumn listbox.

    Work in the environment of dev but no exe.  Click in the cell works, but not when you click.

    How something like this work in dev and no exe?

    Déjà vu?

    If you look at the thread of LAVA that you linked, ask you the same question it and I answered it say that there are screws that must be explicitly included in the EXE file. I guess if you search the forums OR thread mentioned there that you will find more details.

  • Client vSphere 5.0 works on network, but not via the SSH tunnel

    Hoping someone can help you.

    Seems that others have this problem as well.

    Can connect to the network, but not through an SSH tunnel.

    On the network, I am invited to accept/ignore a SSL certificate.  This does not happen when trying to connect remotely (via an SSH tunnel).

    During troubleshooting, I port passed almost all the ports TCP, starting w / ports 80, 443 and 902.

    Through the SSH tunnel, via a browser, I can successfully access https://127.0.0.1 (VMware server), but the client software will not complete the connection, w / error message: «...» "The client could not send a request to the server."

    Any help would be appreciated.

    Thank you.

    Managed to understand this myself, having invested in a way more time I should have.

    This announcement in the hope that it will help others.

    In your SSH client, port forward with the help of one local loop, IP OTHER THAN 127.0.0.1 (such as 127.0.0.2 for example).

    Port 127.0.0.2:443 before--> IP:443 target

    127.0.0.2:902--> target IP:902

    127.0.0.2:903--> target IP:903

  • OAM e-mail link works on desktop but not on phone

    Hi all!

    I created the office and the versions of my site but the oam even that works perfectly on the phone desktop version does not work on the phone; specifically, the symbol of e-mail, which has a mailto link: link. The MCO is a grid square of mugshots with individual e-mail links in each photo.

    I inserted a link to ordinary e-mail directly in muse and it worked fine on my phone, so I think it's a matter of oam. I wonder if I have to design a unique oam for phone site, that the office.

    I can PM my project files for all those who want to look under the hood.

    Any help is greatly appreciated!

    Ian

    Thx for Cynthia answered!

    I only tried the chrome site. You're right, however, totally forgot to test it in other browsers. Now, I know the site of phone works in firefox android but not chrome and native browser of my S6. I'll try as much as possible. But what I do to make it work in browsers more?

    As for the location of the problematic page, I came back to an old version of the site where the CAO located in the 'about' section under the 'diverse team' link text I have since made another version which replaces the MCO with own objects of Muse, which works fine, but I still want to go to the bottom of the issue of the Internet browser.

    thx again!

    Ian

Maybe you are looking for