Demo için
İndirme Bağlantısı
https://www.ulusanyazilim.com/download/yanny-laurel/
Demo için
İndirme Bağlantısı
https://www.ulusanyazilim.com/download/yanny-laurel/
Demo
Mantık
<?php error_reporting(0); $url='http://who.is/whois/'.$_POST["sorguc"]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_URL, $url); $html = curl_exec($ch); $html = file_get_contents($url); @preg_match('#<pre(.*?)pre>#si',$html,$value); @preg_match('#queryResponseHeader (.*?)">#si',$html,$sonuc); if(strlen(strstr($value[1], "No match found")) > 0){ echo '<div class="alert alert-success" role="alert">'.$_POST["sorguc"].' Uygun.</div>'; }elseif($sonuc[1] != "hidden"){ echo '<div class="alert alert-danger" role="alert">'.$_POST["sorguc"].' Alınmış.</div>'; }elseif(strlen(strstr($value[1], "No match found")) == 0 ){ if(strstr($_POST["sorguc"], ".tr")){ echo '<div class="alert alert-danger" role="alert">'.$_POST["sorguc"].' Alınmış.</div>'; }else{ echo '<div class="alert alert-success" role="alert">'.$_POST["sorguc"].' Uygun.</div>'; } }else{ echo '<div class="alert alert-success" role="alert">'.$_POST["sorguc"].' Uygun.</div>'; } ?>
Uzun yıllar önce hazırlamış olduğum bir webmasterin olmazsa olmazı denebilecek bir liste diyebilirim. İsteğiniz olursa eğer, daha gelişmiş, daha geniş, daha yenilikçi bir sistem ve tasarıma taşıyabiliriz.
Anlık arama yapın
<?php //arazi.php içeriği set_time_limit(0); header('Content-Type: text/html; charset=utf-8'); if(!file_exists("cache")){mkdir("cache", 0777);} function iller(){ if(!file_exists("cache/iller.json")){ $il=file_get_contents("http://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/idariYapi/ilListe"); file_put_contents("cache/iller.json",$il); }else{ $il=file_get_contents("cache/iller.json"); } $il=json_decode($il,true); $iller=null; foreach($il["features"] as $il){ $iller[]=$il["properties"]; } return $iller; } if(isset($_POST["il"])){ if(!file_exists("cache/".$_POST["il"].".json")){ $ilce=file_get_contents("http://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/idariYapi/ilceListe/".$_POST["il"]); file_put_contents("cache/".$_POST["il"].".json",$ilce); }else{ $ilce=file_get_contents("cache/".$_POST["il"].".json"); } $ilce=json_decode($ilce,true); $ilceler=null; echo '<select id="ilce" class="form-control">'; echo '<option>Seçiniz</option>'; foreach($ilce["features"] as $ilce){ echo '<option value="'.$ilce["properties"]["id"].'">'.$ilce["properties"]["text"].'</option>'; } echo '</select>'; echo '<script type="text/javascript"> $(document).ready(function() { $("#sonuc").html("Seçmeye Devam Ediniz..."); $("#ilce").bind("change",function(){ if($("#ilce").val() != 0){ var ilce=$("#ilce option:selected").val(); var ilcetext=$("#ilce option:selected").text(); $.ajax({ type: "POST", url: "arazi.php", data: "ilce="+ilce, dataType: "html", beforeSend: function() { $("#ilce").after("<label id=\"ilce\" class=\"bg-secondary text-white form-control\">"+ilcetext+"</label>"); $("#ilce").remove(); }, success: function(data) { $("#ilce").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["ilce"])){ if(!file_exists("cache/".$_POST["ilce"].".json")){ $mahalle=file_get_contents("http://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/idariYapi/mahalleListe/".$_POST["ilce"]); file_put_contents("cache/".$_POST["ilce"].".json",$mahalle); }else{ $mahalle=file_get_contents("cache/".$_POST["ilce"].".json"); } $mahalle=json_decode($mahalle,true); $mahalleler=null; echo '<select id="mahalle" class="form-control">'; echo '<option>Seçiniz</option>'; foreach($mahalle["features"] as $mahalle){ echo '<option value="'.$mahalle["properties"]["id"].'">'.$mahalle["properties"]["text"].'</option>'; } echo '</select>'; echo '<script type="text/javascript"> $(document).ready(function() { $("#sonuc").html("Seçmeye Devam Ediniz..."); $("#mahalle").bind("change",function(){ if($("#mahalle").val() != 0){ var mahalle=$("#mahalle option:selected").val(); var mahalletext=$("#mahalle option:selected").text(); $.ajax({ type: "POST", url: "arazi.php", data: "mahalle="+mahalle, dataType: "html", beforeSend: function() { $("#mahalle").after("<label id=\"mahalle\" class=\"bg-secondary text-white form-control\">"+mahalletext+"</label>"); $("#mahalle").remove(); }, success: function(data) { $("#mahalle").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["mahalle"])){ echo '<input type="number" id="ada" class="form-control" placeholder="Ada">'; echo '<input type="number" id="parsel" class="form-control" placeholder="Parsel">'; echo '<script type="text/javascript"> $(document).ready(function() { $("#sonuc").html("Ada ve Parsel Bilgisi Giriniz..."); $("#ada,#parsel").on("input",function(){ var ada=$("#ada").val(); var parsel=$("#parsel").val(); if(ada > 0 && parsel > 0){ var mahalle='.$_POST["mahalle"].'; $.ajax({ type: "POST", url: "arazi.php", data: "veri="+mahalle+"/"+ada+"/"+parsel, dataType: "html", beforeSend: function() { $("#sonuc").html("Sorgulanıyor..."); }, success: function(data) { $("#sonuc").html(data); } }); } }); }); </script>'; }elseif(isset($_POST["veri"])){ if(!file_exists("cache/".str_replace("/","-",$_POST["veri"]).".json")){ $parsel=file_get_contents("http://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/parsel/".$_POST["veri"]); file_put_contents("cache/".str_replace("/","-",$_POST["veri"]).".json",$parsel); }else{ $parsel=file_get_contents("cache/".str_replace("/","-",$_POST["veri"]).".json"); } $parsel=json_decode($parsel,true); if($parsel["properties"]){ foreach($parsel["properties"] as $title=>$key){ echo '<label class="bg-success text-white form-control">'.ucfirst($title)." : ".$key."</label>"; } }else{ echo '<label class="bg-danger text-white form-control">Sonuç Bulunamadı</label>"; } } /* ada 1 parsel 2 https://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/idariYapi/mahalleListe/648 ada 5 parsel 3 https://cbsservis.tkgm.gov.tr/megsiswebapi.v2/api/parsel/144808/5/3 */ ?>
Bir kaç seçenek seçip araç fiyatınızı öğrenebilirsiniz. Araç fiyatları piyasada verilen ilanlara göre anlık olarak değişkenlik gösterebilir. Aklınıza geldikçe yeni piyasa fiyatını öğrenmeyi unutmayın.
Araç tipi, marka, model gibi seçenekleri seçerek en üst ve en alt verilen ilan fiyatlarını görebilir, model yılı girerek araç yaşına göre verilen en üst ve en alt fiyatları görebilirsiniz.
Kodları
<?php //arac.php içeriği header("Content-Type: text/html; charset=UTF-8"); if(isset($_POST["vasita"])){//arac yukle $site = "http://www.sahibinden.com".$_POST["vasita"]; $icerik = file_get_contents($site); preg_match_all('@categoryList(.*?)ul>@si',$icerik,$cikti); preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$cikti[1][0],$c); $y=count($c[1]); echo '<select id="arac" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=0;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; echo '<script type="text/javascript"> $(document).ready(function() { $("#sonuc").html("Seçmeye Devam Ediniz..."); $("#arac").bind("change",function(){ if($("#arac").val() != 0){ var arac=$("#arac option:selected").val(); var aractext=$("#arac option:selected").text(); $.ajax({ type: "POST", url: "arac.php", data: "arac="+arac, dataType: "html", beforeSend: function() { $("#arac").after("<label id=\"arac\" class=\"bg-secondary text-white form-control\">"+aractext+"</label>"); $("#arac").remove(); }, success: function(data) { $("#arac").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["arac"])){//model yukle $site = "http://www.sahibinden.com".$_POST["arac"]; $icerik = file_get_contents($site); preg_match_all('@categoryList(.*?)ul>@si',$icerik,$cikti); if(isset($cikti[1][0])){ preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$cikti[1][0],$c); $y=count($c[1]); echo '<select id="model" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=0;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; }else{ preg_match_all('@searchResultsCat(.*?)searchResultLeft-query@si',$icerik,$arama); preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$arama[1][0],$c); $y=count($c[1]); echo '<select id="model" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=3;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; } echo '<script type="text/javascript"> $(document).ready(function() { $("#model").bind("change",function(){ if($("#model").val() != 0){ var model=$("#model option:selected").val(); var modeltext=$("#model option:selected").text(); $.ajax({ type: "POST", url: "arac.php", data: "model="+model, dataType: "html", beforeSend: function() { $("#model").after("<label id=\"model\" class=\"bg-secondary text-white form-control\">"+modeltext+"</label>"); $("#model").remove(); }, success: function(data) { $("#model").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["model"])){//seri yukle $site = "http://www.sahibinden.com".$_POST["model"]; $icerik = file_get_contents($site); preg_match_all('@categoryList(.*?)ul>@si',$icerik,$cikti); if(isset($cikti[1][0])){ preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$cikti[1][0],$c); $y=count($c[1]); echo '<select id="seri" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=0;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; }else{ preg_match_all('@searchResultsCat(.*?)searchResultLeft-query@si',$icerik,$arama); preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$arama[1][0],$c); $y=count($c[1]); echo '<select id="seri" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=4;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; } echo '<script type="text/javascript"> $(document).ready(function() { $("#seri").bind("change",function(){ if($("#seri").val() != 0){ var seri=$("#seri option:selected").val(); var seritext=$("#seri option:selected").text(); $.ajax({ type: "POST", url: "arac.php", data: "seri="+seri, dataType: "html", beforeSend: function() { $("#seri").after("<label id=\"seri\" class=\"bg-secondary text-white form-control\">"+seritext+"</label>"); $("#seri").remove(); }, success: function(data) { $("#seri").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["seri"])){//tur yukle $site = "http://www.sahibinden.com".$_POST["seri"]; $icerik = file_get_contents($site); preg_match_all('@categoryList(.*?)ul>@si',$icerik,$cikti); if(isset($cikti[1][0])){ preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$cikti[1][0],$c); $y=count($c[1]); echo '<select id="tur" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=0;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; }else{ preg_match_all('@searchResultsCat(.*?)searchResultLeft-query@si',$icerik,$arama); preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$arama[1][0],$c); $y=count($c[1]); if($y != 5){ echo '<select id="tur" class="form-control">'; echo '<option>Araç Seçiniz</option>'; for($x=5;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } echo '</select>'; }else{ yil($_POST["seri"]); } } echo '<script type="text/javascript"> $(document).ready(function() { $("#tur").bind("change",function(){ if($("#tur").val() != 0){ var tur=$("#tur option:selected").val(); var turtext=$("#tur option:selected").text(); $.ajax({ type: "POST", url: "arac.php", data: "tur="+tur, dataType: "html", beforeSend: function() { $("#tur").after("<label id=\"tur\" class=\"bg-secondary text-white form-control\">"+turtext+"</label>"); $("#tur").remove(); }, success: function(data) { $("#tur").after(data); } }); } }); }); </script>'; }elseif(isset($_POST["tur"])){//yil yukle yil($_POST["tur"]); }elseif(isset($_POST["yil"])){//fiyat yukle tablo($_POST["link"],$_POST["yil"]); }elseif(isset($_POST["cek"])){//fiyat yukle tablo($_POST["cek"]); }else{ $site = "http://www.sahibinden.com/kategori/vasita"; $icerik = file_get_contents($site); //echo $icerik; preg_match_all('@categoryList(.*?)ul>@si',$icerik,$cikti); preg_match_all('@<a href="(.*?)">(.*?)</a>@si',$cikti[1][0],$c); $y=count($c[1]); for($x=0;$x<$y;$x++){ echo '<option value="'.$c[1][$x].'">'.$c[2][$x].'</option>'; } } function yil($link){ echo '<input type="number" min="1900" max="2100" id="yil" class="form-control" placeholder="Model Yılı">'; echo '<script type="text/javascript"> $(document).ready(function() { $.ajax({ type: "POST", url: "arac.php", data: "cek='.$link.'", dataType: "html", beforeSend: function() { $("#sonuc").html("Yükleniyor..."); }, success: function(data) { $("#sonuc").html(data); } }); $("#yil").on("input", function() { var yil=$("#yil").val(); if(yil > 1900 && yil < 2100){ $.ajax({ type: "POST", url: "arac.php", data: "yil="+yil+"&link='.$link.'", dataType: "html", beforeSend: function() { $("#sonuc").html("Yükleniyor..."); }, success: function(data) { $("#sonuc").html(data); } }); } }); }); </script>'; } function tablo($link,$yil=null){ echo '<script type="text/javascript"> $(document).ready(function() { $("#img").remove(); }); </script>'; $data=null; if($yil != null){ $data["a5_min"]=$yil; $data["a5_max"]=$yil; } $data["sorting"]="price_asc"; $site = "http://www.sahibinden.com".$link."?".http_build_query($data); $icerik = file_get_contents($site); preg_match_all('@searchResultsRowClass(.*?)tbody>@si',$icerik,$arama); if(isset($arama[1][0])){ preg_match('@<tr(.*?)tr>@si',$arama[1][0],$tr); preg_match_all('@<td class="searchResultsAttributeValue">(.*?)</td>@si',$tr[1],$td); preg_match('@searchResultsPriceValue">(.*?)</td>@si',$tr[1],$tl); $data["sorting"]="price_desc"; $site = "http://www.sahibinden.com".$link."?".http_build_query($data); $icerik = file_get_contents($site); preg_match_all('@searchResultsRowClass(.*?)tbody>@si',$icerik,$arama); preg_match('@<tr(.*?)tr>@si',$arama[1][0],$tr); preg_match_all('@<td class="searchResultsAttributeValue">(.*?)</td>@si',$tr[1],$td2); preg_match('@searchResultsPriceValue">(.*?)</td>@si',$tr[1],$tl2); echo '<table class="table"> <tbody> <tr> <td><b>Renk</b> : '.$td[1][2].'<br> <b>KM</b> : '.$td[1][1].'<br> <b>Yıl</b> : '.$td[1][0].' </td> <td><b>En Ölü Fiyat</b><br>'.strip_tags($tl[1]).'</td> </tr> <tr> <td><b>Renk</b> : '.$td2[1][2].'<br> <b>KM</b> : '.$td2[1][1].'<br> <b>Yıl</b> : '.$td2[1][0].' <td><b>En Temiz Fiyat</b><br>'.strip_tags($tl2[1]).'</td> </tr> </tbody> </table>'; }else{ echo '<table class="table"> <thead class="thead-light"> <tr> <th scope="col">Sonuc Bulunamadi</th> </tr> </thead> </table>'; } }
Bir kaç kelime yazarak anlık arama yapın
<?php //gonder.php içeriği $site = "http://www.sahibinden.com/kelime-ile-arama?query_text=".$_POST["aranan"]; $icerik = file_get_contents($site); echo $icerik; ?>
Mouse hareketleri ve yön tuşları ile yemleri toplayın.