require_once('includes/config.php'); require_once('includes/functions.php'); $keywords = str_replace(' ','+',trim($_POST['recherche'])); $url = htmlspecialchars(strip_tags(trim($_POST['url'])),ENT_QUOTES); if ($url == 'http://') $url = ''; $token = htmlspecialchars($_POST['token'],ENT_QUOTES); die("En panne pour le moment :( Prochaine tentative mardi soir"); function httpPost($url, $data, $accessToken = '') { $curl = curl_init($url); if ($accessToken != '') { $header = []; $header[] = 'Authorization: Token '.$accessToken; curl_setopt($curl,CURLOPT_HTTPHEADER,$header); } curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); curl_close($curl); return $response; } if (sha1('posthaha54098734;ù%'.session_id()) == $token && ($keywords != "" || $url != "")) { $data = httpPost('https://backend.positeo.com/rest/duplicate/post',['keywords' => $keywords, 'url' => $url, 'ip' => $_SERVER['REMOTE_ADDR']],'ea9627babf56c484f2c68565a5c5243e'); $json = json_decode($data); if (empty($json)) die('Trop de requêtes, Veuillez patienter quelques minutes.'); foreach($json as $search) { $html = '
'; foreach($search->contents as $content) { $html .= '