Server IP : 80.241.246.6 / Your IP : 216.73.216.188 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli1/weather/ |
Upload File : |
<?php header("Content-type: text/html; Charset=utf-8"); session_start(); mb_internal_encoding("UTF-8"); error_reporting(E_ALL); date_default_timezone_set("Asia/Tbilisi"); $array = [ "safe" => "medium", "safe" => "medium", "googlehost" => "google.com", // "searchType" => "image", "num" => 10, "q" => "სახლი" ]; function pre($a){ echo "<pre>"; print_r($a); echo "</pre>"; } if(isset($_GET['q']) && $_GET['q']) { //if() $array['q'] = $_GET['q']; $get = "https://www.googleapis.com/customsearch/v1?key=AIzaSyBWB5iI9-Y5bF8NDIRdIFvkX2ZQKyepbHg&cx=008494747990220806249:exlfj8jf-nu"; $get .= "&".http_build_query($array); $json = @json_decode(file_get_contents($get)); if($json) { //pre($json); $search_count = $json->searchInformation->totalResults; $html = '<div class="news_box" style="margin:0 auto">'; foreach ($json->items as $key => $value) { if (isset($value->pagemap->cse_thumbnail)) $image = $value->pagemap->cse_thumbnail[0]->src; elseif (isset($value->pagemap->website)) $image = $value->pagemap->website->image; else $image = "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTXNHX7L3nqq6vdJ2SXIU3LG3OOFD3UcF93i-W1062k1M-lFI19_-jm9Q"; //$image = $html .= '<a class="news" href="' . $value->link . '" target="_blank"> <img class="img2 left" src="' . $image . '"> <span class="title">' . $value->htmlSnippet . '</span> </a>'; #echo $value->formattedUrl."<br/>"; } $html .= '</div>'; } //pre($json->items); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <base href="/"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ქართული საძიებო სისტემა » Ros.ge</title> <meta name="description" content="მოძებნე სასურველი სიახლე, ფილმები, თამაშები, განცხადებები, ვიდეოები, ყველაფერი ერთ საიტზე" /> <meta name="keywords" content="" /> <link href="http://ros.ge/images/favicon.ico?v=1.0" rel="shortcut icon" /> <link href="http://ros.ge/css/style.css?v=1.5" type="text/css" rel="stylesheet" /> <meta name="msvalidate.01" content="0C9FE8C7F5936FA6D2A92ABC253E10D6" /> <meta name='yandex-verification' content='78586790c472f0bd' /> </head> <body> <div id="header"> <ul class="menu left"> <li><a><strong>საძიებო საიტები:</strong></a></li> <li><a>eruditor.ge</a></li> <li><a>skolebi.com</a></li> <li><a>kharagauli.ge</a></li> <li><a>unblockedgamese.com</a></li> </ul> <?=(isset($search_count))?'<div class="count right">სულ ნაპოვნია: '.$search_count.' სიახლე':'';?> </div> </div> <div class="search_m"> <div cl ass="logo"> <a class="rosge">saxli.ge</a> <h1>ქართული საძიებო სისტემა</h1> </div> <div class="search_box1"> <form class="search_form1 right" action="<?=$_SERVER['PHP_SELF']?>?id=search" method='get'> <input type="text" class="searchinp1 left" id='autofocus' name='q' value="<?=isset($_GET['q'])?$_GET['q']:'';?>" /> <input type="submit" class="search_btn1 left" value="ძებნა"/> </form> </div> </div> <?php if(isset($html)) echo $html; else{ ?> <!--<div class="last_added">ახალი დამატებული</div>--> <a href="http://ontv.ge" target="_blank" class="news1"><span class="title"><img src="http://ontv.ge/images/favicon.png" style=" float: left; margin-right: 6px; width: 16px; height: 16px; "><span style="float:left">Ontv</span></span> <img src="http://ros.ge/images/ontv.png" style=" width: 155px; height: 103px; margin-top: 6px; "></a> <a href="https://facebook.com" target="_blank" class="news1"><span class="title"><img src="https://fbstatic-a.akamaihd.net/rsrc.php/yl/r/H3nktOa7ZMg.ico" style=" float: left; margin-right: 6px; width: 16px; height: 16px; "><span style="float:left">Facebook</span></span> <img src="http://ros.ge/images/fb.png" style=" width: 155px; height: 103px; margin-top: 6px; "></a> <a href="https://gmail.com" target="_blank" class="news1"><span class="title"><img src="https://www.google.com/a/cpanel/khundadze.com/images/favicon.ico" style=" float: left; margin-right: 6px; width: 16px; height: 16px; "><span style="float:left">Gmail</span></span> <img src="http://ros.ge/images/gmail.png" style=" width: 155px; height: 103px; margin-top: 6px; "></a> <a href="https://youtube.com" target="_blank" class="news1"><span class="title"><img src="https://s.ytimg.com/yts/img/favicon_48-vfl1s0rGh.png" style=" float: left; margin-right: 6px; width: 16px; height: 16px; "><span style="float:left">Youtube</span></span> <img src="http://ros.ge/images/youtube.png" style=" width: 155px; height: 103px; margin-top: 6px; "></a> <a href="https://ok.ru" target="_blank" class="news1"><span class="title"><img src="http://st.mycdn.me/res/i/o100.png" style=" float: left; margin-right: 6px; width: 16px; height: 16px; "><span style="float:left">Odnoklasniki</span></span> <img src="http://ros.ge/images/ok.png" style=" width: 155px; height: 103px; margin-top: 6px; "></a> <a href="#" class="news1" style="background-color: #E2E2E2 !important;"> <img src="http://ros.ge/images/add.png" style=" position: absolute; top: 30px; left: 52px; "></a> <a href="#" class="news1" style="background-color: #E2E2E2 !important;"> <img src="http://ros.ge/images/add.png" style=" position: absolute; top: 30px; left: 52px; "></a> <a href="#" class="news1" style="background-color: #E2E2E2 !important;"> <img src="http://ros.ge/images/add.png" style=" position: absolute; top: 30px; left: 52px; "></a> <div class="clear"></div> <?php }?> </body> </html>