I have coded the scripts {Socks Proxy checker .php} (html,php)

how to make it check in bulk or multi checking at once,
i want to paste socks list and let it filter them and start the check progress

<html>
  
   <head>
  <title>SYR!4N H!XT0X socks CH3K3R</title>

  <link rel="icon" type="image/ico" href="cc.ico">
   </head>
   
      
   
</html>
<html lang="pt-br">
<head>
	
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" >

<link rel="stylesheet" href="styles.css" >

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></div></script>
</head>
<body>

<center>
<br/>
	<form method="POST">	
<center>
         <h2 class="form-signin-heading">SYR!4N H!XT0X SOCKS CH3K3R</h2>
         <p>
 <h6><center>CONTACT ME: HIXTOX@GMAIL.COM</center></h6>
 </p>
        <center>
		<div class="form-group">
			<div class="col-sm-4 col-sm-offset-4">
				<center><textarea rows="8" cols="60" name="socks" class="form-control" id="bin" placeholder="Enter your bin here!"  style="resize:none" required autofocus></textarea></center><br/>
				<input type="submit" name="enviar" id="enviar" value="CHECK NOW" class="btn btn-lg btn-primary btn-block">
			</div>	
		</div>
	</form>	
</center>
</body>
</html>
<?php  


if (isset($_POST['socks'])) {
	$bin=substr($_POST['socks'], 0,33);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://check.dichvusocks.us/func.php?socks=$bin&checkpp=&proxystop=no");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);


$result = curl_exec($ch);
$split=explode("|",$result);

echo "<center>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";

echo $split[0],"|",$split[1],"|",$split[2],"|",$split[3],"|",$split[4],"|",$split[5],"|",$split[6],"|",$split[7],"|","#CHECKED @ SYRI4N-HIXT0X-CHECKER#";

echo "</center>"; 

//print_r($result);
return $result;
}
?>

You’ll need to explain a bit better what you are trying to do, but just looking at your HTML, there’s no easy way to say this, but it’s a mess!

You have two HEAD sections and you close the HTML tag twice. Putting your PHP code outside the closed HTML tag is unlikely to be what you want either.

1 Like

hhhh i know
but this the the test file

Well then, correct your test file and then show us what you have.

textarea is for the (socks list) which is formated as => ipaddress:port (ex=>1.229.165.34:12389)
101.100.136.84:60720

				<center><textarea rows="8" cols="60" name="socks" class="form-control" id="bin" placeholder="Enter your bin here!"  style="resize:none" required autofocus></textarea></center><br/>
				<input type="submit" name="enviar" id="enviar" value="CHECK NOW" class="btn btn-lg btn-primary btn-block">

this is the php script of curl to check if the socks ip:port is live or dead



if (isset($_POST['socks'])) {
	$bin=substr($_POST['socks'], 0,33);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://check.dichvusocks.us/func.php?socks=$bin&checkpp=&proxystop=no");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);


$result = curl_exec($ch);
$split=explode("|",$result);

echo "<center>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";

echo $split[0],"|",$split[1],"|",$split[2],"|",$split[3],"|",$split[4],"|",$split[5],"|",$split[6],"|",$split[7],"|","#CHECKED @ SYRI4N-HIXT0X-CHECKER#";

echo "</center>"; 

//print_r($result);
return $result;
}
?>

the issue is this script checkes one ip:port
when i need it to check
ip:port
ip2:port2
ip3:port3
…etc

You’ll need to modify this bit:

if (isset($_POST['socks'])) {
	$bin=substr($_POST['socks'], 0,33);

so that instead of just taking the first 33 characters of your text box and checking that address, instead you figure out how many separate IP addresses there are, and call the check for each one.

I’d take the actual code that does the check (starting with your curl_init() line) and split that out into a function, then I’d call that repeatedly, and perhaps build the results into an array for displaying later.

I would consider changing from a textarea to a series of text inputs. It could shift some of the heavy lifting from the code to the user, but it might be an acceptable alternative that would have some benefits.

how about this

$socks_list = $_POST['socks'];
if (strlen($socks_list)<1) {$socks_list = "82.67.164.189:55525\n71.229.119.8 11465\n67.81.180.167|59931\n211.189.18.165/5818\n";}
if($_POST["submit"]){
function getsocks($list)
{
preg_match_all("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[:|_\s\/]\d{1,7}/", $list, $socks);
$socks = array_unique($socks[0]);
$socks2 = array();
For ($i=0;$i<count($socks);$i++)
{
if($_POST['port']){
If(stristr($socks[$i],$_POST['port1'])){
continue;
}
}
If (strlen($socks[$i]) > 7) $socks2[] = str_replace(array("|", "/", " ", "-"),':',$socks[$i]);
}
Return $socks2;
}
$socks_list = str_replace(" ",":",$socks_list);
$socks_list = str_replace("|",":",$socks_list);
$socks_list = str_replace("/",":",$socks_list);
$AllSocks = getsocks($socks_list);
$All = count($AllSocks);
$socks_list = "";
For ($i = 1; $i <= $All; $i++)
{
$socks_list .= $AllSocks[$i-1]."\n";
}
}

but it still doesn’t read the pasted ip:port

OK, but what does it do? There’s nothing in that code to actually connect to anything, just to separate out a list of IP/Port combinations. Does that part work? If it does, then package the connection part of your first code into a function and call it for each ip/port pair.

that is the issue
am trying to identify each line i the textarea as IP:PORT

the curl is

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://check.dichvusocks.us/func.php?socks=$bin&checkpp=&proxystop=no");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);


$result = curl_exec($ch);
$split=explode("|",$result);

echo "<center>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";

echo $split[0],"|",$split[1],"|",$split[2],"|",$split[3],"|",$split[4],"|",$split[5],"|",$split[6],"|",$split[7],"|","#CHECKED @ SYRI4N-HIXT0X-CHECKER#";

echo "</center>"; 

//print_r($result);
return $result;

function …

function getsock($bin){
    preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[:|_\s\/]\d{1,7}/", $bin,  $str);
    return $str[0];
}

is there any thing missing ?
plz help

We are at cross-purposes here. The function you have written is to try to split out IP/port sets, whereas I am talking about writing another function that actually does the curl section of things. I can’t help on the regular expressions - if splitting the IP addresses out is causing a major issue, then perhaps you should use one of the suggestions from further up, to provide several text boxes rather than a single text area.

Roughly I’d be thinking:

// split incoming IP/Port pairs into an array
// foreach array element:
//   call checksite() function
//   display results
// end of foreach
// function checksite() {
//   starting with $ch = curl_init();
// ending with return $result;
// } end of function

I would remove all the display stuff from the checksite() function, just deal with that in your calling code.

If you’re having issues with it, just do as you’d normally do and break it down. If your first code works, modify that to have the checksite() function (or whatever you want to call it) that does all the curl stuff, and get that working. Once you have that working, you can modify the calling code to deal with multiple inputs.

1 Like

thank u
that helped me

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.