0byt3m1n1
Path:
/
var
/
www
/
listcrawler.app
/
public_html
/
ajax
/
[
Home
]
File: validate-recaptcha.php
<?php require 'db.php'; if (empty($_POST['recaptcha'])) { exit('Please set recaptcha variable'); } // validate recaptcha $response = $_POST['recaptcha']; $post = http_build_query( array ( 'response' => $response, 'secret' => '6Lf9ku4UAAAAANPnEPjjJN7TwZThNgy5SEA9vlsI', 'remoteip' => $_SERVER['REMOTE_ADDR'] ) ); $opts = array('http' => array ( 'method' => 'POST', 'header' => 'application/x-www-form-urlencoded', 'content' => $post ) ); $context = stream_context_create($opts); $serverResponse = @file_get_contents('https://www.google.com/recaptcha/api/siteverify', false, $context); if (!$serverResponse) { exit('Failed to validate Recaptcha'); } $result = json_decode($serverResponse); if (!$result -> success) { exit('Invalid Recaptcha'); } //exit('Recaptcha Validated'); $remoteIP = get_ip_address(); $list_id = ( isset($_REQUEST["list_id"]) && is_numeric($_REQUEST["list_id"]) ) ? $_REQUEST["list_id"] : 0; $location_id = ( isset($_REQUEST["location_id"]) && is_numeric($_REQUEST["location_id"]) ) ? $_REQUEST["location_id"] : 0; $getIP = "SELECT count(id) as count_ip from `ip_addresses` WHERE `ip_address` = '" . $remoteIP . "' "; $getIPResult = mysqli_query($conn, $getIP); $getIPRow = mysqli_fetch_assoc($getIPResult); if ($getIPRow['count_ip'] >= 5) { echo "<span class = 'text-danger'>You have reached a limit for viewing mobile numbers.<br>To lift your limits, visit our sponsor and create a free account: <a href='https://w4mmaps.com/listcrawler.html' target='_blank' style='color:#6E4AC8;'>Click Here</a></span>"; } else { // Get mobile number $getMobileNumber = "SELECT `mobile_id` from `lists_locations` WHERE `list_id` = '" . $list_id . "' LIMIT 1 "; $getMobileNumberResult = mysqli_query($conn, $getMobileNumber); $count_MobileNumber = mysqli_num_rows($getMobileNumberResult); echo "<span style='color: #222 !important;font-weight: 700;'>Mobile Number: </span><span class='purple-light' style='font-weight: 700;'> "; if ( $count_MobileNumber > 0 ) { $getMobileNumberRow = mysqli_fetch_assoc($getMobileNumberResult); echo get_mobile_number($getMobileNumberRow["mobile_id"]); } else { echo "987897475212"; } echo "</span> "; $insertIP = "INSERT INTO `ip_addresses` (`ip_address`) VALUES ( '" . $remoteIP. "')"; mysqli_query($conn, $insertIP); } exit;