MoonAPNS (was:Run a PHP script from within ASP.Net/C#?) -
MoonAPNS (was:Run a PHP script from within ASP.Net/C#?) -
i have php script (taken here) send apns notifications ios app web services app written in c#/asp.net.
i've managed install php on server , tested script command line don't know how within web service (or if possible).
is there way run php file within asp.net or improve trying re-write php script in c#?
-edit- more searching turned this, prompted me seek next code, without success:
public void pushnotificationalert() { string phone call = @"""php.exe"""; string param1 = @"-f"; string param2 = @"""~\apns\mypush.php"""; process myprocess = new process(); processstartinfo myprocessstartinfo = new processstartinfo(call); myprocessstartinfo.useshellexecute = false; myprocessstartinfo.redirectstandardoutput = true; myprocessstartinfo.arguments = string.format("{0} {1}", param1, param2); myprocess.startinfo = myprocessstartinfo; myprocess.start(); streamreader mystreamreader = myprocess.standardoutput; }
in case still interested, code used moon worked:
// utilize moonapns send force notification notificationpayload payload = new notificationpayload(devicetoken, message, badge, "default"); var notificationlist = new list<notificationpayload>() { payload }; pushnotification force = new pushnotification(true, p12file, p12pass); var result = push.sendtoapple(notificationlist);
c# php ios web-services apple-push-notifications
Comments
Post a Comment