PHP JSON-RPC Client Class

JSON-RPC 2.0 supported without notification and batch request.

Based on php_curl, currently available options auth_user and auth_pass for http basic auth.

PHP JSON-RPC Client Class by @sskaje:

MQTT client lib in PHP



MQ Telemetry Transport, MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.

In the ‘software’ page, I found two client libs in PHP, phpMQTT by @bluerhinos and PECL SAM, outdated or dead.

I chose phpMQTT in my project publishing message to mosquitto but found it somewhat too old and lack of QoS support. I decided to code my own.

I spended 6 hours watching CSL, Bundesliga, and Barclay’s English Premier League, then brought out this: Almost the most ugly code I’ve ever written.

Only PUBLISH and it’s related commands are supported until I have enough time to finish it.

It might be a choice to those who are publishing their messages and not subscribing any topic.

MQTT client lib in PHP by @sskaje:

PHP Client for Apple Push Notification Service


协议消息体使用的是APNS的简版消息结构,暂不支持Enhanced notification format,即不支持identifier和expiry,省了8个字节,不过稍后有空会加上。



开发过程中遇到的最大问题主要在 stream_socket_client() 的 STREAM_CLIENT_PERSISTENT 使用上:

Continue reading “PHP Client for Apple Push Notification Service” »

PHP Client for Apple Push Notification Service by @sskaje:

AppShopper 导入Appstore 历史购买记录

功能页面: (执行速度很慢,建议下载源码自己跑CLI)。
页面源码 ,各路代码在

以前写的iTunes Gift Card AutoRedeemer在 /index.php/2012/03/itunes-gift-card-autoredeemer/,这个版本把代码集成进去了,但是没测能不能用,因为现在自己没需求了。

iTunes Appstore这边没啥可说的,抓包就是了。

关于Appshopper,一开始的实现方案是使用他家的iOS App,用Charles Proxy抓包拿到完整https的协议(关于Charles Proxy的破解点这里),前一天晚上看了下他家网站提交数据的参数。发现如果需要把某个App添加到wishlist/myapp里,app id能直接拿到,但是还需要查到一个updateid。这个updateid从他家网页实在不好查,虽然可以匹配,但是流程会很麻烦,好在他家iOS App有个detail的接口,能拿到包括 updateid, wantit, ownit 这样的字段。这样实现起来,就逐个app地去查updateid和是否已经添加到wishlist/myapp,若未添加则执行添加。效率堪忧。

Continue reading “AppShopper 导入Appstore 历史购买记录” »

AppShopper 导入Appstore 历史购买记录 by @sskaje:

iTunes Gift Card AutoRedeemer



基本只是实现了登录、load redeem页(有form token)、提交请求(pc端有校验,相当于确认过程,需要输入apple id和密码)。


php auto_redeemer.php XXXXXXXXXXXX
php auto_redeemer.php
php auto_redeemer.php



iTunes Gift Card AutoRedeemer by @sskaje: