var json_upload2 = "json_name=" + JSON.stringify({name: ''+z+'', id:''+tar+''});
fetch('Example.php', { method: 'post', headers: { "Content-Type":"application/x-www-form-urlencoded"}, body: json_upload2 }) .then(function(response) { if(response.ok) return response.text(); }).then(function(data){document.getElementById("demo666").innerHTML = data;
});
<?php
//print_r($_POST);
if (!empty($_POST[json_name])) { $json_data = $_POST['json_name'];$json = json_decode($json_data,true); $a = $json['name'];$b = $json['idtime'];
if ($a !== false) {
var data = data: {
name: '',
------------------
json_name="+data ;
var locat111111 =\'<a href=\x22#\x22 class=\x22ssssss\x22
<a href=\x27#\x27 class=\x27your\x27
echo '<a href="'.$id.'" ><span onclick="player.loadVideoById(\''.$id.'\',0);history.pushState(\''.$id.'\',null, \''.$id.'\');return false">.................
<span onclick="player.loadVideoById(\''.$videoId.'\', 0);history.pushState(\''.$videoId.'\', null, \''.$videoId.'\');document.title = \''.$title3.'\';return false">.......................
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^v/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . v/index.php [L]
</IfModule>
<div id="btn1666">коллекция каналов и роликов</div><div class="canal"></div>
$(document).ready(function() { $('#btn1666').hover(function(){ $(this).remove();
$.getJSON('json/kolleksia.json', function(data) {for(var i=0;i<data.users.length;i++){
$('.canal').append('<br><input type=\"image\" name=\"message\" value=\"'+data.users[i].id+ '\" src=\"'+data.users[i].num+'\"> ' + data.users[i].text + ' <br><br><br>' ).hide().fadeIn(1000);
}.......................
$fff2 ='https://www.googleapis.com/youtube/v3/search'.$region.'&'.$vpoisk.'&key=///////////////'.$rating.'&type=video&'.$time.'&part=snippet&safeSearch=none'. $kolisestvo.'
';
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $fff2);
curl_setopt($ch, CURLOPT_USERAGENT, 'PHP Bot');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
$json = curl_exec($ch);
curl_close($ch);
if ($json !== false) {
$json = preg_replace("#(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|([\s\t]//.*)|(^//.*)#", '', $json);
// setlocale(LC_ALL, 'ru_RU.utf8');
$json = json_decode($json, true) ;
// print_r($json);
if (isset($json['items']))
{
foreach($json['items'] as $items) {
$channelId =$items['snippet']['channelId'];
$publishedAt =$items['snippet']['publishedAt'];
$title =$items['snippet']['title'];
if (isset($items['snippet']['thumbnails']['default']['url']))
{ $thumbnails =$items['snippet']['thumbnails']['default']['url'];
if (isset($items['id']['videoId'])) {
$videoId =$items['id']['videoId'];