Jump to content

how to inclued more then 10 php file .........in a main php.......?


Go to solution Solved by Psycho,

Recommended Posts

trq is right, there is no limit on file includes. Perhaps you're having inclusion conflicts where you've mistakenly included a PHP file on one file and then on another file. In that case, use a require_once or include_once.

Why don't you explain your problem first? As stated you can include any number of files that you wish. But, sure, here is an example - but I doubt it will help you since you've not explained your problem.

//Example of how to include more than 10 files
include('file1.php');
include('file2.php');
include('file1.php');
include('file3.php');
include('file4.php');
include('file5.php');
include('file6.php');
include('file7.php');
include('file8.php');
include('file9.php');
include('file10.php');
include('file11.php');
include('file12.php');
include('file13.php');
include('file14.php');
Edited by Psycho

There is no limit on file includes. What is the problem exactly?

i have 100 php with same code but deffrent user name and pass and want to run @ 1 clik  .......help plzzzzzz

 

 

here is code.....

 

<?php
set_time_limit(0);
$url = $_SERVER['HTTP_HOST'];
print"<title>xxxxx</title>
<div style='background:grey;padding:6px;color:white' align='center'><b>$url</b> -xxxxxxxxx</div> ";

$username ="8888888";
$password ="2417978";
$tomob ="888888888";
$myFile22 = "xxxxxx.txt";
$fh2 = fopen($myFile22, 'r');
$theData22 = fread($fh2, filesize($myFile22));
fclose($fh2);


$raman = explode(';',$theData22);


      function randomstring() {
      $characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
      $param=rand(5,strlen($characters) - 1);
      $random_string_length = $param;
      $string = '';
        for ($i = 0; $i < $random_string_length; $i++) {
      $string .= $characters[rand(0, strlen($characters) - 1)];
      }
        return ($string);
   }


$c = $_REQUEST['recaptcha_challenge_field'];
$cv = $_REQUEST['recaptcha_response_field'];
$cookie = tempnam("/tmp", "CURLCOOKIE");

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com");
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_REFERER,"http://example.com");
$one=curl_exec($ch);

preg_match("/input name=\"(.*?)\" type=\"text\" class=\"existing_user round_four\" id=/i",$one,$matches);
$user = $matches[1];

preg_match("/input name=\"(.*?)\" type=\"password\" class=\"existing_user round_four\" id=/i",$one,$matches);
$pass = $matches[1];

$post_data = "$user=$username&$pass=$password&RememberMe=1&submit2=LOGIN HERE";
$url = "http://example.com";
$cookie = tempnam ("/tmp", "CURLCOOKIE");
$ch = curl_init();
curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0" );
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$ct = curl_exec( $ch );

if(stristr($ct,"number & password"))
{
echo "<font color='red'><b>Invalid mobile number / password. Try Again With Correct Details.</b></font>";
}
else
{

if(stristr($ct,"xxxxx.php"))
{
$post_data2 = "captchaType=google&loginButton=LOGIN&recaptcha_challenge_field=$c&recaptcha_response_field=$cv";
curl_setopt($ch, CURLOPT_URL,"http://example.com");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$dt = curl_exec($ch);

if(!stristr($dt,xxxxx.php"))
{ die("<font color='red'><b>Invalid Captcha. Try Again.</b></font>");  }
}
$ff ="1";

for($loop=1;$loop<=$ff;$loop++)
{

$post_data2 = "";
curl_setopt($ch, CURLOPT_URL,"http://example.com");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$dt = curl_exec($ch);

preg_match('/name=\"qxci\" value=\"(.*?)\"/',$dt,$qxc);
$qxci = $qxc[1];
preg_match('/name=\"QuestionId\" value=\"(.*?)\"/',$dt,$qi);
$qid = $qi[1];
preg_match('/"ps_bg1">(.*?)</',$dt,$pk);
$ps = $pk[1];
preg_match('/"rs_bg1">(.*?)</',$dt,$rkk);
$rs = $rkk[1];
$sub = "1";

preg_match('/Question number:-(.*?)</',$dt,$aid);
$ansid = $aid[1];
$ansid2 = $ansid - $sub;

$ansit = $raman[$ansid2];
preg_match('/input type=\"text\" name=\"(.*?)\" id=\"(.*?)\" class=\"inputtxt\"   value=\"Type your answer here\"  style=\"border:0 none;\"/',$dt,$asninput);
$rasninput = $asninput[1];

$post_data3 = "qxci=$qxci&QuestionId=$qid&zxcoiesesscd=&$rasninput=$ansit";
curl_setopt($ch, CURLOPT_URL,"http://example.com");
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data3);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$at = curl_exec($ch);


if(strstr($at,"xxx.ph"))
{
echo "<b><font color=green>".$ansid." xxxxxxxx.</font></b><br>";

echo "<b><font color=blue>Balance: ".$rs.".".$ps."</font></b><br>";

}
elseif(strstr($at,"xxxxx.ph"))
{
echo "<b><font color=magenta>xxxxxxxxxxxxxxxx.</font></b><br>";

}
else
{
echo "<b><font color=red>".$ansid." xxxxxxxxxxxx.</font></b><br>";
}
}
//rrrr ends


   $ff ="1";

         for($loop=1;$loop<=$ff;$loop++)
         {

$post_data2 = "";
   curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $dt = curl_exec($ch);
preg_match('/name=\"qxci\" value=\"(.*?)\"/',$dt,$qxc);
$qxci = $qxc[1];
preg_match('/name=\"QuestionId\" value=\"(.*?)\"/',$dt,$qi);
$qid = $qi[1];

preg_match('/value=\"(.*?)\" name=\"OptionId\"/',$dt,$oi);
$oid = $oi[1];


preg_match('/name=\"OptionId\" value=\"(.*?)\"/',$dt,$poi);

$poid = $poi[1];

if(!$oid)
{
$roid = $poid;
}
else
{
$roid = $oid;
}


preg_match('/"ps_bg1">(.*?)</',$dt,$pk);
$ps = $pk[1];
preg_match('/"rs_bg1">(.*?)</',$dt,$rkk);
$rs = $rkk[1];

preg_match('/uestion no: -(.*?)</',$dt,$rkkk);
$pollnumber = $rkkk[1];

if(stristr($dt,"xxxxxxxxxxxx"))
{
$myq = rand(1,999);
$o1 = rand(1,9);
$o2 = rand(8,19);
$o3 = rand(21,29);
$o4 = rand(5,19);
$post_data5 = "zxcoiesesscd=&PollUserName=$tomob&PollUserQuestion=Which is The Next Letter of $myq&Option1=$o1&Option2=$o2&Option3=$o3&Option4=$o4";
   curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data5);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $st = curl_exec($ch);


   if(strstr($st,"uestionSaved.php"))
{
echo "<b><font color=magenta>xxxxxxxxxxxxxxxxxx.</font></b><br>";
}
   elseif(strstr($st,"xxxxxxxxxxx"))
{
echo "<b><font color=skyblue>xxxxxxxx.</font></b><br>";

}
else
{
curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($ch, CURLOPT_REFERER, "http://example.com");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $dt = curl_exec($ch);
echo "<b><font color=brown>xxxxxxxxxxxxxxxxxx.</font></b><br>";
}
}
else
{
$post_data3 = "qxci=$qxci&QuestionId=$qid&OptionChecked=1&zxcoiesesscd=&OptionId=$roid";
   curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data3);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $at = curl_exec($ch);

   if(strstr($at,"xxxxxxxx.php"))
{
echo "<b><font color=green>".$pollnumber." xxxxxxxxxxxxxxxxxxxxxxxxx.</font></b><br>";

echo "<b><font color=blue>Balance: ".$rs.".".$ps."</font></b><br>";



}
else
{
echo "<b><font color=red>xxxxxxxxxxxxxxxxxxxxxx.</font></b><br>";
}
}
}
//poll ends

curl_setopt($ch, CURLOPT_URL,"http://example.com");    
 
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 
 
   curl_setopt($ch, CURLOPT_REFERER, "http://example.com");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $dt = curl_exec($ch);

preg_match_all("/document.getElementById(.*?).value/",$dt,$mbll);
$mbl = $mbll[1][16];
$mbl = str_replace("('","",$mbl);
$mbl = str_replace("')","",$mbl);
preg_match_all('/textarea name=\"(.*?)\"/i',$dt,$msgg);
$m1 = $msgg[1][0];

$m2 = $msgg[1][1];

$m3 = $msgg[1][2];

$m4 = $msgg[1][3];

$m5 = $msgg[1][4];

$m6 = $msgg[1][5];

$m7 = $msgg[1][6];

$m8 = $msgg[1][7];
$ff ="1";

$time = date('H')+1;
$time="$time:00 - $time:59";
$day=date('d');
$month=date('m');


         for($loop=1;$loop<=$ff;$loop++)
         {

      $msssg = randomstring();
$post_data2 = "zxcoiesesscd=&MessageLength=140&GlobalKeyValue=1&$mbl=$tomob&$m1=$msssg&$m2=$msssg&$m3=$msssg&$m8=$msssg&$m4=$msssg&$m5=$msssg&$m6=$msssg&$m7=$msssg&SendNow_=Send Now&BtnSendNow_=Send Now&Day=$day&Month=$month&Year=2013&TimeInterval=$time";
   curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($ch, CURLOPT_REFERER, "http://example.com");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $dt = curl_exec($ch);

   if(strstr($dt,"msgSent.php"))
{
curl_setopt($ch, CURLOPT_URL,"http://example.com");    
   curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_TIMEOUT, 0);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data2);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($ch, CURLOPT_REFERER, "http://example.com");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         
   $dt = curl_exec($ch);
echo "<b><font color=green>".$loop." xxxxxxxxxxxxxxx.</font></b><br>";

}
else
{
echo "<b><font color=red>ccccccccccccccccccc.</font></b><br>";
}
}
//www ends





}
print"<div style='background:grey;padding:4px;color:white' align='center'>© script by xxxxx.</div>";
?>
  • Solution

 

i have 100 php with same code but deffrent user name and pass and want to run @ 1 clik  .......help plzzzzzz

$users = array(
    'username1' => 'password1',
    'username2' => 'password2',
    'username3' => 'password3',
    'username4' => 'password4',
    'username5' => 'password5'
    // etc.
);
 
foreach($users as $username => $password)
{
    //Execute same block of code for each username/password
}
Edited by Psycho
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.