Skip to content

Instantly share code, notes, and snippets.

@petervansark
Forked from edstenson/receive_post.php
Created April 2, 2025 08:35
Show Gist options
  • Select an option

  • Save petervansark/b5a69f018d1a4ac1db7deb8ba919980b to your computer and use it in GitHub Desktop.

Select an option

Save petervansark/b5a69f018d1a4ac1db7deb8ba919980b to your computer and use it in GitHub Desktop.
PHP example to receive an HTTP POST request from Push
<?php
file_put_contents('/tmp/ds.' . microtime(true) . '.json', file_get_contents('php://input'));
echo json_encode(array('success' => true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment