var i = 0;(function(history){ var pushState = history.pushState;
history.pushState = function(state) { if (typeof history.onpushstate == "function")
{history.onpushstate({state: state});}
return pushState.apply(history, arguments); }})(window.history);
window.onpopstate = history.onpushstate = function(e){ i++; test=JSON.stringify(e.state);
var reg_pusto = test;
if (reg_pusto.length>10)
{ test =test.replace(/"/g,"");
loc =window.location.pathname;
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onload="var myHeading = document.querySelector('h1');
myHeading.innerHTML = '<?php echo' Hello world! '.$a.''; ?>';this.parentNode.removeChild(this);" />
<h1></h1> <br>
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&maxResults=15&order=date&playlistId='.$v.'&key=ключ
https://developers.google.com/youtube/v3/docs/search/list
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.update?part=brandingSettings&resource=%257B%257D
echo '<b>Поиск каналов по названию.</b><hr>';
// if ($v == 'sear') { $v21 ='&type=channel&order=viewCount'; } ;
$v = str_replace(",live5","",$v);
// &channelId
echo '' . $v . '<br>';
$str = strlen($v);
$i2 = 24;
if ($str == $i2 ) {
$fff ='https://www.googleapis.com/youtube/v3/channels?part=snippet&id='.$v.'&key=ключ
$ch = curl_init()
<a href="#" id="1" onclick="load()"> 1 вариант </a><br>
<a href="#" id="ыыыыыыыыыыы1" onclick="load()"> 1 вариант </a><br>
<button type="button" id="привет 2" onclick='load()'> 2 вариант - кнопка </button><br>
<p id="d"></p>
<script>
function load() {fetch('e.php?a='+event.target.id+'zdraste', { method: 'get'})
.then(function(response) { if(response.ok){ return response.text();}
else { if(response.status==404) return Promise.reject("нету ничего");
else if(response.status==403) return Promise.reject("закрыто");
else return Promise.reject("что то не так");
}
})
.then(function(text){
document.getElementById("d").innerHTML = text;
})
.catch(function(err) {
document.getElementById("d").innerHTML = err;
})
}
</script>
<?php
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{ header('Content-Type: text/html; charset=utf-8');
$errors = array(); $form_data = array();
if (empty($_POST['name'])) { $errors['name'] = 'пусто'; }
if (!empty($errors)) { $form_data['success'] = false;
$form_data['errors'] = $errors; } else { $form_data['success'] = true;
$f=$_POST['name'];
$form_data['posted'] = '' . $f . '';
}
echo json_encode($form_data);
}
?>
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{ header('Content-Type: text/html; charset=utf-8');
if (isset($_POST['message'])) { $v=$_POST['message'];
https://www.googleapis.com/youtube/v3/channels?part=statistics,snippet,contentDetails&id=UCKonxxVHzDl55V7a9n_Nlgg&key=ключ тут