Geri çağırış Lim10Ata\Flatix\xfwidgets::gethtml yanlışdır (error_invalid_class).
  • Her vaxtınız xeyirli ugurlu olsun. Sayt adi: www.Panelim.Ws Sayt vaxtina 220 gun qalib qeydiyyat tarixi 10.12.2021 den bu yana iwleyir. saytin Ayliq geliri 50 - 500 arasi olur (iwletmeyden cox wey aslidi) daimi müştəriləri var 1907 istifadeci qeydiyyatlidir. 10000+ sifariw tamamlanibdir Sayti satmaqda meqsedim vaxtim olmamasidir. Script+ Temple Lisenziyyalidir her bir weyi ustunde verilecek Lisenziyya panneller,domen panelleri, hosting panelleri Saytin Qiymeti 300Azn

Foruma xoş gəldiniz 👋, Qonaq

Forum məzmununa və bütün xidmətlərimizə daxil olmaq üçün qeydiyyatdan keçməli və ya foruma daxil olmalısınız. Foruma üzv olmaq tamamilə pulsuzdur.

Qeydiyyatdan kec

Alqı-Satqı Youtube api də kömək lazımdı

Alqı-Satqı
2

Shukur_23

Tanınmış istifadecisi
Silver istifadeci
Qoşuldu
6 Sen 2022
Mesajlar
140
Reaksiya hesabı
27
Xallar
28
Salam yt api v3 də mənə sadə pagination (səyfələmə) lazımdı php üçün xaiş paylaşardınız
 
2

Shukur_23

Tanınmış istifadecisi
Silver istifadeci
Qoşuldu
6 Sen 2022
Mesajlar
140
Reaksiya hesabı
27
Xallar
28
<!DOCTYPE html>
<html lang="az-AZ">
<head>
<title>Esas sehife || Youtube Mp3</title>
<meta name="viewport" content="width=width-device, initial-scale=1.0">
</head>
<body>

<form method="GET" action="/s"><input type="text" name="q" value="Bir sey Axtar"><input type="submit" value="Axtar"></form>

<?php

$key ="archived"; //our key for youtube
$q=$_GET["q"];
$page=1;
$max=11;
$link =file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=".$q."&maxResults=".$max."&pageToken=".$page."&key=".$key."");

$ok=json_decode($link);
if(!isset($_GET["page"])){

$page=$_GET["page"];
}

foreach($ok->items as $n){
//echo "<pre>";
//print_r($n);
echo $n->snippet->title."<br>";
echo "<iframe src=\"https://youtube.com/embed/".$n->id->videoId."\"></iframe><br>Tarix: ".date("Y-M-D H:i:s",strtotime($n->snippet->publishedAt))."<hr>";

if(isset($n->nextPageToken)){

echo "<a href=\"?page=".$n->nextPageToken."\">Sehife daha</a>";

}
if(isset($n->prevPageToken)){

echo "<a href=\"?page=".$n->prevPageToken."\">Sehife daha</a>";

}

}

?>

</body></html>



kod budur uyğunlaşdıra bilərsiniz bir zəhmət?
 
3

GameKing

Kohnelerden
Silver istifadeci
Qoşuldu
10 Sen 2022
Mesajlar
225
Reaksiya hesabı
114
Xallar
43
<!DOCTYPE html>
<html lang="az-AZ">
<head>
<title>Esas sehife || Youtube Mp3</title>
<meta name="viewport" content="width=width-device, initial-scale=1.0">
</head>
<body>

<form method="GET" action="/s"><input type="text" name="q" value="Bir sey Axtar"><input type="submit" value="Axtar"></form>

<?php

$key ="archived"; //our key for youtube
$q=$_GET["q"];
$page=1;
$max=11;
$link =file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=".$q."&maxResults=".$max."&pageToken=".$page."&key=".$key."");

$ok=json_decode($link);
if(!isset($_GET["page"])){

$page=$_GET["page"];
}

foreach($ok->items as $n){
//echo "<pre>";
//print_r($n);
echo $n->snippet->title."<br>";
echo "<iframe src=\"https://youtube.com/embed/".$n->id->videoId."\"></iframe><br>Tarix: ".date("Y-M-D H:i:s",strtotime($n->snippet->publishedAt))."<hr>";

if(isset($n->nextPageToken)){

echo "<a href=\"?page=".$n->nextPageToken."\">Sehife daha</a>";

}
if(isset($n->prevPageToken)){

echo "<a href=\"?page=".$n->prevPageToken."\">Sehife daha</a>";

}

}

?>

</body></html>



kod budur uyğunlaşdıra bilərsiniz bir zəhmət?

PHP:
<!DOCTYPE html>
<html lang="az-AZ">
<head>
<title>Home page || Youtube Mp3</title>
<meta name="viewport" content="width=width-device, initial-scale=1.0">
</head>
<body>

<form method="get">
    <input type="text" name="q" placeholder="type in something">
    <input type="submit" value="Search">
</form>

<?php

$q = urlencode(htmlspecialchars(trim($_GET['q']));
$page = isset($_GET['page']) ? htmlspecialchars(trim($_GET['page'])) : '';

define('YT_KEY', 'write the yt key in here');
define('YT_MAX', 10);
define('YT_URL', 'https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&order=viewCount'.($q ? '&q='.$q : '').'&maxResults=' . YT_MAX . '&key=' . YT_KEY);

function getResults($page = '') {
    if(!$page) {
        $json = file_get_contents(YT_URL);
    }
    else {
        $json = file_get_contents(YT_URL . '&pageToken=' . $page);
    }
    return json_decode($json, true);
}

$result = getResults($page);

if(count($result['items'])) {
 
    $next = isset($result['nextPageToken']) ? $result['nextPageToken'] : '';
    $prev = isset($result['prevPageToken']) ? $result['prevPageToken'] : '';
 
    foreach($result['items'] as $item) {
        $id = $item['id']['videoId'];
        $title = $item['snippet']['title'];
        $date = date('d-m-Y H:i:s', strtotime($item['snippet']['publishedAt']));
     
        echo "<h4>{$title}</h4>";
        echo "<p><iframe src='https://youtube.com/embed/{$id}'></iframe></p>";
        echo "<p>Date: {$date}</p>";
        echo "<hr>";
    }
 
    $pageArr = array();
 
    if($prev) {
        array_push($pageArr, "<a href='?" . ($q ? "q={$q}&" : "") . "page={$prev}'>Evvelki</a>";
    }
 
    if($next) {
        array_push($pageArr, "<a href='?" . ($q ? "q={$q}&" : "") . "page={$next}'>Novbeti</a>";
    }
 
    if(count($pageArr)) {
        echo implode(' | ', $pageArr);
    }
}
else {
    echo 'No video matching your search was found';
}

?>

</body>
</html>
 
Son redaktə:
2

Shukur_23

Tanınmış istifadecisi
Silver istifadeci
Qoşuldu
6 Sen 2022
Mesajlar
140
Reaksiya hesabı
27
Xallar
28
PHP:
<!DOCTYPE html>
<html lang="az-AZ">
<head>
<title>Home page || Youtube Mp3</title>
<meta name="viewport" content="width=width-device, initial-scale=1.0">
</head>
<body>

<form method="get">
    <input type="text" name="q" placeholder="type in something">
    <input type="submit" value="Search">
</form>

<?php

$q = urlencode(htmlspecialchars(trim($_GET['q']));
$page = isset($_GET['page']) ? htmlspecialchars(trim($_GET['page'])) : '';

define('YT_KEY', 'write the yt key in here');
define('YT_MAX', 10);
define('YT_URL', 'https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&order=viewCount'.($q ? '&q='.$q : '').'&maxResults=' . YT_MAX . '&key=' . YT_KEY);

function getResults($page = '') {
    if(!$page) {
        $json = file_get_contents(YT_URL);
    }
    else {
        $json = file_get_contents(YT_URL . '&pageToken=' . $page);
    }
    return json_decode($json, true);
}

$result = getResults($page);

if(count($result['items'])) {
 
    $next = isset($result['nextPageToken']) ? $result['nextPageToken'] : '';
    $prev = isset($result['prevPageToken']) ? $result['prevPageToken'] : '';
 
    foreach($result['items'] as $item) {
        $id = $item['id']['videoId'];
        $title = $item['snippet']['title'];
        $date = date('d-m-Y H:i:s', strtotime($item['snippet']['publishedAt']));
    
        echo "<h4>{$title}</h4>";
        echo "<p><iframe src='https://youtube.com/embed/{$id}'></iframe></p>";
        echo "<p>Date: {$date}</p>";
        echo "<hr>";
    }
 
    $pageArr = array();
 
    if($prev) {
        array_push($pageArr, "<a href='?" . ($q ? "q={$q}&" : "") . "page={$prev}'>Evvelki</a>";
    }
 
    if($next) {
        array_push($pageArr, "<a href='?" . ($q ? "q={$q}&" : "") . "page={$next}'>Novbeti</a>";
    }
 
    if(count($pageArr)) {
        echo implode(' | ', $pageArr);
    }
}
else {
    echo 'No video matching your search was found';
}

?>

</body>
</html>
Sagol qaqa
 
Üst