こんにちわ、@damayaです。
仕組みは簡単です。
アプリが公開されていなければ、公開されるまで1分間隔で監視します。
公開されたという判別は、HttpStatusが404から200に変わった場合です。
公開された場合は、JavaScriptのAlertでお知らせします。
ソースを見るには「もっと読む」からどうぞ。
<html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>アプリ公開チェッカー for Google Play</title> </head> <body> <form> <div id="message"></div> <input type="text" name="id" size="30" /><input type="submit" value="アプリ公開チェック" /> </form> <script language="javascript" type="text/javascript"> <!--- <?php $result_message = ''; if(isset($_GET['id'])){ $id = htmlspecialchars($_GET['id'], ENT_QUOTES); if($id !== '' && preg_match('|^[0-9a-zA-Z.-]+$|', $id)){ $headers = get_headers('https://play.google.com/store/apps/details?id=' . $id); if(isset($headers[0]) && stristr($headers[0], '200 OK') !== false){ $result_message = '<a href=\"https://play.google.com/store/apps/details?id=' . $id . '\" target=\"_blank\">' . $id . '</a> は、公開されています'; echo 'alert("' . $id . '\nは、公開されています");'; }else{ $result_message = $id . ' は、公開されていません'; echo 'setTimeout("window.location.reload()", 60000);'; } }else{ $result_message = 'パッケージ名を正しく入力してください'; } } echo 'document.getElementById("message").innerHTML = "' . $result_message . '";';
30分くらいで作ったのでソースがアレですが、いかがでしょうか。
何かのお役にたてれば。