IPhone Feedback Service with PHP

0 vote down star
HI All,
Has anybody been able to extract the device tokens from the binary data that iPhone APNS feedback service returns using PHP? I am looking for something similar to what is been implementented using python here http://www.google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#m5eOMDWiKUs/APNSWrapper /%5F%5Finit%5F%5F.py&q=feedback.push.apple.com
As per the Apple documentation, I know that the first 4 bytes are timestamp, next 2 bytes is the length of the token and rest of the bytes are the actual token in binary format. (http://developer.apple.com/IPhone/library/documentation/NetworkingInternet/Conce ptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//app le%5Fref/doc/uid/TP40008194-CH101-SW3)
I am successfully able to extract the timestamp from the data feedback service returns, but the device token that I get after i convert to hexadecimal using the PHP's built in method bin2hex() is actually different than original device token. I am doing something silly in the conversion. Can anybody help me out if they have already implemented APNS feedback service using PHP?
TIA,
-Anish

as ^^ said, yes you can use it as an ipod touch. but just be sure NOT to update if/when the next update comes out, it may brick the phone, and you'll have to activate in order to use it again (as was with v2.0).
another thing, you may be able to get the ETF waived in such a case where reception at your house is bad. you'll have to talk it over with AT&T tho.

Similar Messages

  • Java web service with php SOAP client

    Hi!
    I have a Java web service with a procedure, which connects to a database:
    public boolean connectDB(String driver,String host, String user, String password)
    try {
    Class.forName(driver);
    connection =
    DriverManager.getConnection
    host
    , user
    , password
    return true;
    } catch (Exception v_exception) {
    System.out.println("connectDB(): " + v_exception);
    return false;
    If I call it from a PHP client, it doesn't work but doesn't throw any exceptions on the server side.
    The way I call it:
    $client = new SoapClient
    (<path>);
    try
    $conn=$client->connectDB();
    catch (SoapFault $exception)
    echo "\nexception: " .$exception;
    On the client side, I have an exception, but it's not very detailed:
    exception: Object id #2
    I had a simple function, too, which returns a string:
    public String getTestString()
    return "test";
    and if I call it from PHP, it's working...
    What may be the problem?

    Neither the simple "setter" methods work.. :(
    The php client side:
    $string="aladar";
    $client->setSample($string);
    $return = $client->getSample();
    The server side:
    public String sample;
    public String getSample() {
    return sample;
    public void setSample(String a_sample) {
    sample = a_sample;
    Any ideas?

  • (iPhone)-Discontinuing Service with AT&T

    Hello All, Does anyone know if I have my iPhone service with AT&T turned off, will they still allowme to have access to my music and wifi, like basically a Touch iPod, only with no phone service? I get very lousey reception where I live and always have to use my Verizon cell to make or receive calls on a cell phone. I know I'll probably have to pay a disconnection fee because I've only been with AT&T since April 2008.
    John

    as ^^ said, yes you can use it as an ipod touch. but just be sure NOT to update if/when the next update comes out, it may brick the phone, and you'll have to activate in order to use it again (as was with v2.0).
    another thing, you may be able to get the ETF waived in such a case where reception at your house is bad. you'll have to talk it over with AT&T tho.

  • Using SSL in flash builder 4 data service with PHP

    I am converting a program I wrote with Flex 3 into Flash builder 4, and I wanted to try to use the built-in data services instead of using the httpservice as I was doing before. The one thing I cannot figure out is how to make it use a secure connection (https) when connecting to that data service. I have looked everywhere I can think of and cannot find where I can set this. Anyone know where and how to set this? The server I am connecting to only allows secure connections, so doing it any other way is not an option.
    Thanks.

    Having the same problem with a Java REST service using HTTPS requests, Adobe Air appears to ask to verify the certificate with every single request on windows ???  and on mac after accepting the certificate  we do not get a result?

  • Using web service with our WP 8.1 app

    please i need help , for our graduation project we are making an app for tourism but in order to bring data we started to use web service with php and our professor told us to connect our app with something called json web service but I dunno how to do
    this i need any help any tutorial to do it a book or something please 

    I'd start with the documentation:
    How to connect to an HTTP server using Windows.Web.Http .

  • HT4942 After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • Problems on Windows 7 Professional 64 with PHP data service

    I've created a data service using PHP in a PHP Eclipse project and I'm trying to connect to it from my new Flash project. When I try to create a custom data type via the Configure Return Type dialog, "Auto detect the return type from sample data" radio button, I get the following error:
    There was an error while invoking the operation. Check  your operation inputs or server code and try invoking the operation again. 
    Reason:
    Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2003): Can't connect to MySQL  server on 'localhost' (10061) in  C:\Users\davidk\workspace\php-global-includes\mysqlAccess.inc.php on line  11
        /0/onStatusÿÿÿÿ �SIflex.messaging.messages.ErrorMessage extendedData faultCode faultDetail faultString rootCause correlationId clientId destination messageId timestamp timeToLive headers  body  „m …a#0  C:\Zend\ZendServer\share\ZendFramework\library\Zend\Amf\Server.php(550):  Zend_Amf_Server->_dispatch('getProductVersi...', Array, 'GetPlayData')#1  C:\Zend\ZendServer\share\ZendFramework\library\Zend\Amf\Server.php(626):  Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))#2  C:\Zend\Apache2\htdocs\play-debug\gateway.php(69):  Zend_Amf_Server->handle()#3 {main} ‚UError instantiating class GetPlayData to  invoke method getProductVersions: Error connecting to database server as user  via password configured in  config_cdna_testdb.php  IE83D9958-920E-E203-54BC-E5365BD85289 I5496259E-8C36-AC89-E234-00000D37FD49  I7E8A1BD7-9D60-9329-DBFB-00001B5BE8C7  126823334100     
    Note that I've tested the GetPlayData class and the getProductVersions() method with some simple "unit testing" code and it works fine when I execute it directly. It just won't run when called from this dialog.
    I tried to debug the gateway.php process that is used to do this connecting without much success so far.
    Is Windows 7 supported for PHP data service development in this beta release? I'm using Version 4.0 build 253292

    One more clue: the message from the exception shows that the global variables I'm using to configure the MySQL connection parameters are not set somehow. Maybe I need to upgrade my Zend Framework?
    Nope. I upgraded to the latest Zend Framework and it still did not work. The global variables are not working. When I hard coded the connection parameters into the constructor of the GetPlayData class, then it worked fine. I just switched to using define() to create constants instead of using the globals and that worked, too.
    It is as if globals set in one include file are not available in another include file. I agree that using them might be a bad programming practice of sorts, but it seems wrong to disallow / not support something that is part of the core language!
    So, I don't know if this is a Windows 7 thing or just a general behavior. Globals within the same file seem to work fine still, but not from another include file.
    So the answer for me is to not use these cross-include file globals in code that is going to be used from Flash Builder.

  • My iPhone 4 appears with no service every day, i have to restarted and a few hours later again the same problem, Any other solution please???

    my iPhone 4 appears with no service every day, i have to make restart and a few hours later again the same problem, Any other solution please???

    This is almost always a symptom of a phone that was jailbroken or hacked to unlock it.
    Where did you get the phone?

  • Web Services with ColdFusion and PHP mixed

    Hi,
    We need to used web services provided by remote server. The
    problem is the
    remote server is on PHP and our server is on ColdFusion. Is
    there a way to
    use the web services on PHP server with our ColdFusion
    server?
    I understand ColdFusion automatically generate the WSDL by
    adding ?wsdl
    after the CFC, but I can't do the same thing because the
    remote server is
    not on ColdFusion. They have given us the wsdl web address,
    but it seems
    using the wsdl address directly without CFC is not working.
    Is that right?
    Please let me know.
    YC

    From the coldfusion side of things, it all seems okay what
    you are doing. It
    is an issue with the php/wsdl side of things. I can access
    the wsdl ok, but
    got the same error as PaulH just then when I tried to use web
    service in
    cf..
    "YC" <[email protected]> wrote in message
    news:[email protected]...
    > OK, I learned a good thing. I tired the Dreamweaver +
    icon with a
    > ColdFusion CFC file and it works fine. Now I learned I
    don't have to code
    > the <cfinvoke> tag, but just drag and drop. But
    when I tried the WSDL
    file:
    >
    http://cyfernet.ces.ncsu.edu/ws/resources.wsdl,
    and "ColdFusion MX" as the
    > proxy generator, I had an error. Do I need any other
    option to choose
    from?
    > It seems "Edit Proxy Generator list" doesn't provide a
    sufficient answer.
    >
    > I know the URL of the WSDL file is correct because I
    used it to create a
    web
    > service in PHP locally on my laptop, and it works. From
    the previous
    > answers of you and PaulH, it seems if the WSDL works
    with PHP, it should
    > also work with any other language, right?
    >
    > Have you tried yourself? Did it work?
    >
    > YC
    >
    > "Eric" <[email protected]> wrote in message
    > news:[email protected]...
    > >
    > >
    > > An easy way to do this is to use the dreaweaver
    'components' palette.
    > > Select
    > > 'web services' from the drop down list and then
    click the '+' icon to
    > > create
    > > the call to the web service. (this uses the
    cfinvoke tag)
    > >
    > >
    > > "YC" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> I feel very sorry to keep asking this
    apparently very basic question,
    but
    > >> please be patient with me.
    > >>
    > >> Yes, it is right that I just need to consume
    the pre-existing web
    > >> service.
    > >> This is the WSDL page:
    http://cyfernet.ces.ncsu.edu/ws/resources.wsdl
    and
    > >> this is the web service page on the server
    using it:
    > >>
    http://cyfernet.ces.ncsu.edu/ws/getresources-client.php,
    provided as an
    > >> example.
    > >>
    > >> So in order to have the page run in ColdFusion,
    at least the following
    > >> tag
    > >> below should come up without an error?
    > >> <cfset
    > >>
    > >
    ws=createObject("webservice","
    http://cyfernet.ces.ncsu.edu/ws/getresources-c
    > > lient.php")>
    > >>
    > >> Sorry, but I still get an error message.
    > >> I need to provide "getResourcesByCatid" as the
    method and "catid" as
    the
    > >> parameter, but it should work only if the
    previous tag works without an
    > >> error, right?
    > >>
    > >> YC
    > >>
    > >>
    > >> "Eric" <[email protected]> wrote in
    message
    > >> news:[email protected]...
    > >> >>>We need to used web services
    provided by remote server.
    > >> >
    > >> > Right, so the web service already exists -
    you just want to consume
    it?
    > >> >
    > >> >>Is there a
    > >> >> >> way to use the web services
    on PHP server with our ColdFusion
    > > server?
    > >> >
    > >> > Yes - thats the whole point of web
    services, you can create them in
    one
    > >> > language/platform and consume them in
    another.
    > >> >
    > >> >> Whey you say "create a web service,"
    do you mean I need to create a
    > >> >> <cfcomponent> tag in CFC format?
    Creating a CFC is not a problem,
    but
    > >> >> how
    > >> >> can I place it on the remote server
    because it is running with PHP,
    > >> >> not
    > >> > with
    > >> >> ColdFusion?
    > >> >
    > >> > Sorry if I am not understanding the
    question clearly, but it seems to
    > >> > me
    > >> > that you want to make use of an existing
    php based web service. Why
    do
    > > you
    > >> > you need to place a CFC on the php server?
    You just need to execute
    the
    > >> > web
    > >> > service from the coldfusion server using
    cfml. As Paulh says:
    > >> >
    > >> > <cfset
    ws=createObject("webservice","url to the php based web service
    > >> > here")>
    > >> >
    > >> > The variable 'ws' being your hook into the
    php web service from
    within
    > >> > your
    > >> > cfml code.
    > >> >
    > >> >
    > >> >
    > >> >
    > >> >
    > >> >
    > >> > "YC" <[email protected]> wrote in
    message
    > >> > news:[email protected]...
    > >> >> Eric,
    > >> >> Whey you say "create a web service,"
    do you mean I need to create a
    > >> >> <cfcomponent> tag in CFC format?
    Creating a CFC is not a problem,
    but
    > >> >> how
    > >> >> can I place it on the remote server
    because it is running with PHP,
    > >> >> not
    > >> > with
    > >> >> ColdFusion?
    > >> >>
    > >> >> YC
    > >> >>
    > >> >> "Eric" <[email protected]>
    wrote in message
    > >> >>
    news:[email protected]...
    > >> >> > >We need to used web services
    provided by remote server. The
    > >> >> > >problem
    > >> >> > >is
    > >> >> > >the
    > >> >> > remote server is on PHP and our
    server is on ColdFusion.
    > >> >> >
    > >> >> > Thats one of the main nenefits of
    web services - this does not
    > > matter.
    > >> >> >
    > >> >> >>> I understand ColdFusion
    automatically generate the WSDL by
    adding
    > >> > ?wsdl
    > >> >> >> after the CFC, but I can't do
    the same thing because the remote
    > > server
    > >> > is
    > >> >> >> not on ColdFusion.
    > >> >> >
    > >> >> > Sounds like you want to consume a
    web service, not create one. You
    > > can
    > >> >> > create the call in Dreamweaver,
    just look up help on calling a web
    > >> >> > service. Also see Adobe site
    using search for 'using web services
    in
    > >> >> > coldfusion'
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> > "YC" <[email protected]>
    wrote in message
    > >> >> >
    news:[email protected]...
    > >> >> >> Hi,
    > >> >> >> We need to used web services
    provided by remote server. The
    > >> >> >> problem
    > >> >> >> is
    > >> >> >> the remote server is on PHP
    and our server is on ColdFusion. Is
    > > there
    > >> > a
    > >> >> >> way to use the web services
    on PHP server with our ColdFusion
    > > server?
    > >> >> >>
    > >> >> >> I understand ColdFusion
    automatically generate the WSDL by adding
    > >> >> >> ?wsdl
    > >> >> >> after the CFC, but I can't do
    the same thing because the remote
    > > server
    > >> > is
    > >> >> >> not on ColdFusion. They have
    given us the wsdl web address, but
    it
    > >> > seems
    > >> >> >> using the wsdl address
    directly without CFC is not working. Is
    > >> >> >> that
    > >> >> >> right?
    > >> >> >>
    > >> >> >> Please let me know.
    > >> >> >>
    > >> >> >> YC
    > >> >> >>
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >

  • I'm getting an error saying this iphone mobile service is not started..what is that means. cannot sync with my itunes

    i'm getting an error saying this iphone mobile service is not started ... what is that means...cannot sync with my itunes

    Try this,
    Close your iTunes
    Click the Windows Start button
    In the "SEARCH" box, type in SERVICES
    In the Program Section of the search result, Click "Services"
    Select "Apple Mobile Device" and click the "STOP the service"
    After the services has stopped, Click "START the service"
    After the Apple Mobile services has started again, open iTunes and connect the device.

  • TS1702 My TomTom does not work following the upgrade to IOS 6.0 - I am getting poor GPS reception on my iPhone 3 using my TomTom car kit ( worked fine prior to upgrade!). I have tried to reset Location Services with no luck! - Help...

    My TomTom does not work following the upgrade to IOS 6.0 - I am getting poor GPS reception on my iPhone 3 using my TomTom car kit ( worked fine prior to upgrade!). I have tried to reset Location Services with no luck! - Help...

    Aa2009 wrote:
    he could have a 3gs but doesn't state 3g or 3gs
    Look at his tag line  

  • My daughter is going on an exchange to France for a year.  I saw that there is a SIMS prepaid card that fits into an iPhone 4S.  Do you think this is the best way to go and oDo d I suspend her service with our carrier?

    My daughter is going on an exchange to France for a year.  I saw that there is a SIMS prepaid phone card that fits into an iPhone 4S.  Is this the best way to go and if so,  Do I suspend her service with our carrier?

    Is your daughter's phone officially unlocked? If not, you won't be able to use any sim other than a sim from the carrier your daughter's phone is locked to. To do what you want, you need to get your daughter's phone officially unlocked. Once done, she can then purchase a local sim when she gets to France.

  • No service with iphone 4

    I just got my phone, it's all set up and such, and the service with AT&T keeps dropping to 1 or 2 bars, and occasionally to no service. I'm in my apartment, where I always got perfect service with my 3G (and my wife's 3G still has perfect service). I've reset all the network settings, turned on and off airplane mode and 3G, but to no avail. Any ideas?

    I was seeing the same symptom. I had a 3GS in one hand and the newly-activated 4 in the other. The 3GS showed 5 bars on the 3G network and the 4 showed 1 bar. Two minutes later they were both at 5 bars 3G. Then the 4 went to 1 bar Edge. 3GS never dropped below 3 bars and never left the 3G network.
    I spent a while on the phone with AT&T and they said it is "possible" that the local network was not "ready" for iPhone 4 activations until tomorrow. However, after several reboots of the iPhone 4, a couple connects\disconnects from iTunes and some utility run by the AT&T rep to force the iPhone 4 to rescan frequencies, it seems to have calmed down a bit. They also had me power off the iPhone 4, remove and replace the SIM, then power on, just to make sure it was making a good physical connection after transport.
    My email flow from Exchange is consistent now and the bars on both iPhones are staying somewhat in sync with each other
    I'll leave more info if anything else happens, either to the positive or negative.

  • Hi i just ended my service with my service provider and was wondering if i have to do anything to use my iphone 3gs with another carrier. do i need to get it unblocked to be able to use another sim card

    I just ended service with my at&t and was wondering if i have to do anything like have my phone unblocked to use another sim card or use another provider

    I have a 3GS, out of contract with AT&T. I emailed for the unlock, and got an email saying:
    "Request number: (xxxxxx)
    Thank you for contacting AT&T Customer Care about unlocking your iPhone.
    We have reviewed your request and confirmed that you are eligible to have the requested iPhone unlocked.
    Please allow 24 hours upon receipt of this notification to complete the unlock.
    To complete the unlock, simply:
    Open iTunes on your Mac or PC and verify that you have Internet connectivity.
    Ensure a SIM card is inserted into your iPhone.
    Connect your iPhone using the dock connector to USB cable that came with your iPhone.
    Backup and restore your iPhone using iTunes. For information on backup and restore, please visit http://support.apple.com/kb/HT1414.
    After restoring, your iPhone will be unlocked.
    Additional information on unlocking can be found at http://support.apple.com/kb/TS3198
    For questions regarding AT&T's wireless service and iPhone, please visit the Phone/Device Learning Center.
    We thank you for your continued business.
    You may also check the status of your unlock request by clicking the link for AT&T's Device Unlock Status Portal.
    Sincerely,
      AT&T Customer Care Team"
    Now the deal here is, iOS 6 is out now, so in order to complete the instructions and restore it with iTunes, you have to update to iOS 6. I decided to keep 5.1.1, so I did NOT restore the phone. I checked a couple IMEI checker sites, and they all said my IMEI was unlocked, so rather than use iTunes, I just replaced the AT&T SIM with an O2-UK SIM card I had when using my Android phone in England. I was pleased to see T-Mobile show up as my carrier when I turned the iPhone on, and in Settings, it shows O2 as the carrier instead of AT&T, due to the O2 SIM being installed. Then a moment later, I got texts saying what my remaining British £ balance is, since I had leftover money on the SIM from my last trip, and another text said "Welcome to America, have a nice trip!"
    The phone isn't jailbroken or anything like that. It's still on 5.1.1 with the proper, working Google mapping. Never restored via iTunes. Never updated to iOS 6. Any SIM card works. No tricks or hacks. You don't have to restore the phone to complete the unlock.

  • I have a att iphone 4s and i have service with sprint can i use it on sprint?

    I have a att iphone 4s and i have service with sprint can i use it on sprint?

    Thank you guys so I figured out how to use it I have a cheap android phone on sprint I use google voice on my phone 4s and I can make calls and text messages also use FaceTime and iMessage. So I'll just trade it or sell it and buy a sprint one until then ill use google voice 

Maybe you are looking for

  • How to calculate start date and last date for current week

    Dear All. i want to calculate the start of the current week as well as the last date of the current week, our week start from Saturday and ends of Friday i.e. Saturday is the first day of the week and Friday is the last day of the week. How can i ach

  • Tiger to Panther ok, reverse doesn't work

    Hi, I can do a video chat perfectly when I initiate it from my Tiger PB (last version) to a Panther eMac (last version), but it doesn't work when the other party tries to initiate it with me. I get the invitation, I accept and then wait and wait and

  • Solaris 10 - cannot get network connection - P4P800 Deluxe motherboard

    Hello I installed Solaris 10 last week. My computer is using a P4P800 Deluxe motherboard with onboard 3Com C940 ethernet (giga). The installation went very well, however when I did "ifconfig -a" I only get the loopback Lol. I went to the Asus website

  • Joins for Quality Tables

    Hi, Could you give me joins for below tables, r12. qa_results qa_results_v cs_incidents_audit_b Thanks.

  • Data Load into the Cube based on Fiscal Year

    Hi All, I was told to load the data into the cube coming from 3 different datasources, but based on fiscal year. I was told to load the data for 2010, 2009 and so on. Any suggestions please...