Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$input = json_decode(file_get_contents('php://input'));
if($input && property_exists($input, 'items') && count($input->items)) {
$item = $input->items[0];
$url = $item->permalinkUrl;
$ch = curl_init('');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'token' => 'xxxx.YOUR.TOKEN.HERE.xxxx',
'source' => $url,
'target_domain' => ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.