开发者

Apple Push Notification service Provider in ASP?

I am developing an iPhone app. and I will use the开发者_高级运维 push notification.

ASP (not asp.net) is the only server side technology I am familiar with. But I can not find any APNS provider in ASP.

Does any man here know where can I find the APNS provider library in ASP?


I don't think there is an APNS for Classic ASP. That is the downside of using such a dated technology. I experienced this myself a few times. To work around this and to be able to keep using the legacy code, I created small services in other languages such as PHP to do those tasks, which in turn are called by server-to-server requests within Classic ASP.

A request looks like this for example:

Dim URL: URL = "http://url.tothephpserviceapi.com?param1=value1&param2=value2"
Dim oXML: Set oXML = CreateObject("MSXML2.ServerXMLHTTP")
oXML.Open "GET", URL, False
oXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" 
oXML.Send
if oXMLreadyState <> 4 then oXML.WaitForResponse 10
Dim TheResponse: TheResponse = oXML.ResponseText

PHP does all the magic. Of course this is not an ideal solution, but writing a client library in Classic ASP might not be worth the effort.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜