<?php

	$url = 'https://hooks.slack.com/services/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';
	
	$text = $_POST['text'];

	$array = array('text' => $text);

	$payload = json_encode($array);                                                                                 
 
	$ch = curl_init($url);                                                                      
	curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
	curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);                                                                  
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
	curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
	    'Content-Type: application/json',                                                                                
	    'Content-Length: ' . strlen($payload))                                                                       
	);                                                                                                                   
	 
	$result = curl_exec($ch);

?>