GÜNCEL FATURA SORGU AÇIĞI BEYLER TURCELLİ EKLİCEM ÜŞENİYOM SUANLIK
DİSCORD.GG/CRAWLL
PHP:
<?php
# Developer By Crawll
$gsm = $_GET['gsm'] ?? '';
if (empty($gsm)) {
header('Content-Type: application/json');
echo json_encode([
'status' => 'error',
'message' => 'telefon numarasi yaz',
'author' => '@Crawlldev'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
exit;
}
$operators = [
'turktelekom' => [
'page_url' => 'https://telnetfaturaborcodeme.com/QueryRequest/QueryRequestPage/35',
'post_url' => 'https://telnetfaturaborcodeme.com/cep-telefonu-fatura/turk-telekom-sabit-ev-is-fatura-sorgulama-borc-odeme/',
'prefixes' => [
'501', '505', '506', '507',
'530', '531', '532', '533', '534', '535', '536', '537', '538', '539',
'552', '553', '554', '555', '559'
]
],
'vodafone' => [
'page_url' => 'https://telnetfaturaborcodeme.com/QueryRequest/QueryRequestPage/32',
'post_url' => 'https://telnetfaturaborcodeme.com/cep-telefonu-fatura/vodafone-fatura-borc-sorgulama-odeme/',
'prefixes' => [
'540', '541', '542', '543', '544', '545', '546', '547', '548', '549'
]
],
'bimcell' => [
'page_url' => 'https://telnetfaturaborcodeme.com/QueryRequest/QueryRequestPage/37',
'post_url' => 'https://telnetfaturaborcodeme.com/cep-telefonu-fatura/bimcell-fatura-sorgulama-borc-odeme/',
'prefixes' => ['551']
],
'pttcell' => [
'page_url' => 'https://telnetfaturaborcodeme.com/QueryRequest/QueryRequestPage/38',
'post_url' => 'https://telnetfaturaborcodeme.com/cep-telefonu-fatura/pttcell-sorgulama-fatura-borc-odeme/',
'prefixes' => ['557']
],
'teknosacell' => [
'page_url' => 'https://telnetfaturaborcodeme.com/QueryRequest/QueryRequestPage/39',
'post_url' => 'https://telnetfaturaborcodeme.com/cep-telefonu-fatura/teknosacell-fatura-sorgulama-borc-odeme/',
'prefixes' => ['558']
],
'turkcell' => [
'page_url' => 'https://www.faturaodemelisin.com/turkcell-fatura-odeme-sorgulama', # EKLİCEM BUNU BEYLER
'post_url' => 'https://www.faturaodemelisin.com/turkcell-fatura-odeme-sorgulama', # EKLİCEM BUNU BEYLER
'prefixes' => [
'530', '531', '532', '533', '534', '535', '536', '537', '538', '539'
]
]
];
function detectOperator($gsm, $operators) {
$gsm = preg_replace('/[^0-9]/', '', $gsm);
if (strlen($gsm) != 10 || substr($gsm, 0, 1) != '5') {
return ['operator' => null, 'error' => 'telefon numarası 10 haneli olsun 0 olmadan örn 5xxxxxxxxx'];
}
$prefix = substr($gsm, 0, 3);
foreach ($operators as $operator => $data) {
if (in_array($prefix, $data['prefixes'])) {
return ['operator' => $operator, 'error' => null];
}
}
return ['operator' => null, 'error' => 'Bu telefon numarası desteklenen operatörlerden birine ait değil.'];
}
$operatorResult = detectOperator($gsm, $operators);
$operator = $operatorResult['operator'];
if (!$operator) {
header('Content-Type: application/json');
echo json_encode([
'status' => 'error',
'message' => $operatorResult['error'],
'author' => '@Crawlldev'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
exit;
}
$gsmWithZero = '0' . $gsm;
$postURL = $operators[$operator]['page_url'];
$refererURL = $operators[$operator]['post_url'];
$postData = [
'aboneNo' => $gsmWithZero,
'sorgu' => 'SORGULA'
];
$ch = curl_init($postURL);
$headers = [
'Content-Type: application/x-www-form-urlencoded',
"Referer: $refererURL",
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
];
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$start_time = microtime(true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
header('Content-Type: application/json');
echo json_encode([
'status' => 'error',
'message' => 'CURL Hatası: ' . curl_error($ch),
'author' => '@Crawlldev'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
exit;
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$end_time = microtime(true);
$response_time = $end_time - $start_time;
if ($httpCode != 200) {
header('Content-Type: application/json');
echo json_encode([
'status' => 'error',
'message' => 'Sunucu yanıtı başarısız oldu http Kodu: ' . $httpCode,
'author' => '@Crawlldev'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
exit;
}
libxml_use_internal_errors(true);
$dom = new DOMDocument();
@$dom->loadHTML($response);
$xpath = new DOMXPath($dom);
$infoDiv = $xpath->query("//div[contains(@class, 'alert-info')]");
$subscriberInfo = $infoDiv->length > 0 ? trim($infoDiv->item(0)->nodeValue) : "Bilgi bulunamadı.";
$tableRows = $xpath->query("//table//tr");
$result = [
'status' => 'success',
'operator' => $operator,
'gsm' => $gsmWithZero,
'abonelikBilgisi' => $subscriberInfo,
'author' => '@Crawlldev',
'api_yanitSuresi' => round($response_time, 4),
'faturalar' => []
];
if ($tableRows->length > 0) {
// Skip header row if exists
$startRow = ($tableRows->item(0)->getElementsByTagName('th')->length > 0) ? 1 : 0;
for ($i = $startRow; $i < $tableRows->length; $i++) {
$row = $tableRows->item($i);
$cells = $row->getElementsByTagName('td');
if ($cells->length >= 5) {
// Extract all cell values first
$cellValues = [];
foreach ($cells as $cell) {
$cellValues[] = trim($cell->nodeValue);
}
// Map cell values to correct fields based on operator
$invoice = [
'faturaNo' => $cellValues[1] ?? 'N/A',
'odemeTarihi' => $cellValues[2] ?? 'N/A',
'faturaTutarı' => $cellValues[3] ?? 'N/A',
'hizmetBedeli' => $cellValues[4] ?? 'N/A',
'toplamTutar' => $cellValues[5] ?? 'N/A'
];
$result['faturalar'][] = $invoice;
}
}
}
header('Content-Type: application/json');
echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
?>
DİSCORD.GG/CRAWLL
