This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This is a PayPal IPN (Instant Payment Notification) broadcaster | |
* Since PayPal does not provide any straightforward way to add | |
* multiple IPN listeners we'll have to create a central IPN | |
* listener that will broadcast (or filter and dispatch) Instant | |
* Payment Notifications to different destinations (IPN listeners) | |
* | |
* http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/ | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE pokespawns ( | |
SELECT spawnpoint_id, latitude, longitude, dt_min, dt_sec, count(*) AS total | |
FROM | |
(SELECT spawnpoint_id, latitude, longitude, | |
DATE_FORMAT(disappear_time, '%i') AS dt_min, | |
DATE_FORMAT(disappear_time, '%s') AS dt_sec | |
FROM pokemon | |
WHERE disappear_time > '2016-10-06' --there was a big change in spawn locations, older spawns are useless | |
) spawns | |
GROUP BY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO pokemon (encounter_id,spawnpoint_id,pokemon_id,latitude,longitude,disappear_time) | |
SELECT | |
UUID(), spawnpoint_id, 132, latitude, longitude, --generates a random encounter ID | |
CONCAT(DATE_FORMAT(DATE_ADD(now(), INTERVAL 15 MINUTE),'%Y-%m-%d %H:'), dt_min, ':' , dt_sec) AS dt | |
FROM | |
(SELECT spawnpoint_id, latitude, longitude, | |
CAST(min(dt_min) AS CHAR(2)) AS dt_min , CAST(min(dt_sec) AS CHAR(2)) AS dt_sec | |
FROM pokespawns WHERE | |
dt_min = DATE_FORMAT(DATE_ADD(now(), INTERVAL 14 MINUTE), '%i') | |
AND total > 1 |