Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update p2000.py #7

Merged
merged 2 commits into from
Feb 5, 2019
Merged

Update p2000.py #7

merged 2 commits into from
Feb 5, 2019

Conversation

tomswinkels
Copy link
Contributor

@tomswinkels tomswinkels commented Feb 4, 2019

Fix for post format from:

type=message&timestamp=2019-02-04+22%3A30%3A03&body=A1+5261LV+%3A+Booglaan+Vught+Obj%3A+bij+reinier+van+arkel+Rit%3A+14468&capcodes=001120105

to:

Array
(
    [payload] => {
    "body": "A1 13106 Rit 14876 Diemen Albert Loethoelistraat 1111KW",
    "capcodes": [
        "002029568",
        "000120999",
        "000120106"
    ],
    "groupid": "07.093",
    "is_posted": false,
    "priority": 1,
    "receivers": "002029568, 000120999, 000120106",
    "sender": 3,
    "timereceived": 1549323037.1240869,
    "timestamp": "2019-02-04 23:30:37"
}
)

With PHP now you can use:

<?PHP
$data = json_decode($_POST['payload']);

Fix for post format from:

type=message&timestamp=2019-02-04+22%3A30%3A03&body=A1+5261LV+%3A+Booglaan+Vught+Obj%3A+bij+reinier+van+arkel+Rit%3A+14468&capcodes=001120105

to:

{
    "body": "A1 5261LV : Booglaan Vught Obj: bij reinier van arkel Rit: 14468",
    "capcodes": [
        "001120105"
    ],
    "groupid": "07.075",
    "is_posted": false,
    "priority": 1,
    "receivers": "001120105",
    "sender": 0,
    "timereceived": 1549319403.5516772,
    "timestamp": "2019-02-04 22:30:03"
}
@tomswinkels tomswinkels mentioned this pull request Feb 4, 2019
@dmitryelj dmitryelj merged commit 0ec41c1 into dmitryelj:master Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants