How can I write this php sign-in source code if I want to fix two accounts in the code? @ Sibang thank you!

Source: Internet
Author: User
Tags echo date
How can I write this php sign-in source code if I want to fix two accounts in the code? @ Sibang thank you! This post was last edited by tangdeli98 at 15:08:00, January 17 ,.

Below is the php sign-in source code. if I want to fix the two accounts in the code, how can I write them? (Thanks to sibang Daxia for the code I modified yesterday .)

I don't know how to use php. I only use desktop software. I tried to make the following changes myself. the logic of using my desktop software should be okay, that is, the variable is constantly assigned and then executed. however, the modified php code reported that the deployment was not successful. it should be wrong. what should I do? I want to sign multiple accounts at a time, when the time to hang up the cron task, access this php file URL link (such as http://checkuxin.duapp.com/index.php? Id = & pw = & vi). it's too much trouble to sign all of them.
For more information about php, the more specific the better. thank you !!
----- This is the modified part that I want to build in two accounts (the second line of the complete code begins to be changed, that is, adding an assignment, and the rest are not moved ):----
If ($ id! = ''And $ do = 'vi') {$ id = '000000' // ----------------------------- account 1 $ pw = '000000' $ rang = rand (333,8888 ); $ url = "http://im.uxin.com: 8887/login? Sn = ". $ rang. "& account = ". $ id. "& pwd = ". md5 ($ pw ). "& pv = android & v = 2.8.4 & sign = ". md5 ($ rang. $ id. "k1oET & Yh7 @ EQnp2XdTP1o/Vo = "). "& netmode = 1 & brand = Xiaomi & model = MI + 2SC & osv = 4.1.1 & imei = ". rand (Random, 99999 ). rand (Random, 99999 ). rand (Random, 99999); $ cont = httpreq ($ url, 1); if (strstr ($ cont, 'uid') {echo "login successful
";} Else {echo" logon failed
";}$ Url =" http://im.uxin.com: 8887/signin? Sn = ". $ rang. "& sign = ". md5 ($ rang. "k1oET & Yh7 @ EQnp2XdTP1o/Vo ="); $ content = json_decode (httpreq ($ url), true); // echo $ content ['content']; echo'
',var_dump($content),'
'; Die (); $ id = '000000' // ----------------------------- account 2 $ pw = '053' $ rang = rand (333,8888); $ url = "http://im.uxin.com: 8887/login? Sn = ". $ rang. "& account = ". $ id. "& pwd = ". md5 ($ pw ). "& pv = android & v = 2.8.4 & sign = ". md5 ($ rang. $ id. "k1oET & Yh7 @ EQnp2XdTP1o/Vo = "). "& netmode = 1 & brand = Xiaomi & model = MI + 2SC & osv = 4.1.1 & imei = ". rand (Random, 99999 ). rand (Random, 99999 ). rand (Random, 99999); $ cont = httpreq ($ url, 1); if (strstr ($ cont, 'uid') {echo "login successful
";} Else {echo" logon failed
";}$ Url =" http://im.uxin.com: 8887/signin? Sn = ". $ rang. "& sign = ". md5 ($ rang. "k1oET & Yh7 @ EQnp2XdTP1o/Vo ="); $ content = json_decode (httpreq ($ url), true); // echo $ content ['content']; echo'
',var_dump($content),'
'; Die ();

------- The following code is available when the built-in account is not fixed :--------------------------------
         
         
 Sign in                
 ";} Else {echo" logon failed
";}$ Url =" http://im.uxin.com: 8887/signin? Sn = ". $ rang. "& sign = ". md5 ($ rang. "k1oET & Yh7 @ EQnp2XdTP1o/Vo ="); $ content = json_decode (httpreq ($ url), true); // echo $ content ['content']; echo'
',var_dump($content),'
'; Die () ;}?>
Time:
Homepage
Copyrightvi1.c. All Rights Reserved


Reply to discussion (solution)

$ Users = array ('username1', 'password1 '), array ('username2', 'password2'), array ('username3', 'password3 '), //....); // times? Array? Every ??? Then follow ?? Row foreach ($ users as $ k =>$ v) {$ rang = rand (333,8888); $ url = "http://im.uxin.com: 8887/login? Sn = ". $ rang. "& account = ". $ v [0]. "& pwd = ". md5 ($ v [1]). "& pv = android & v = 2.8.4 & sign = ". md5 ($ rang. $ v [0]. "k1oET & Yh7 @ EQnp2XdTP1o/Vo = "). "& netmode = 1 & brand = Xiaomi & model = MI + 2SC & osv = 4.1.1 & imei = ". rand (Random, 99999 ). rand (Random, 99999 ). rand (Random, 99999); $ cont = httpreq ($ url, 1); if (strstr ($ cont, 'uid') {echo "login successful
";} Else {echo" logon failed
";}$ Url =" http://im.uxin.com: 8887/signin? Sn = ". $ rang. "& sign = ". md5 ($ rang. "k1oET & Yh7 @ EQnp2XdTP1o/Vo ="); $ content = json_decode (httpreq ($ url), true); // echo $ content ['content']; echo'
',var_dump($content),'
';} Unset ($ users); die ();

$users=array(die();
Thank you !! Let me test it. thank you !!


I didn't know if I had a problem with the space for the time being or reported a deployment error. I didn't specify what the error was. I will test it again later.
Can I simply replace line of the original code?
The following is the complete code after I simply replaced lines 97-111: can the complete code be like this? Thank you !! (Assume that the three accounts are array ('123', 'pd1 '),
Array ('20140901', 'pd2 '),
Array ('20140901', 'pd3 '))

         
         To                
 $ V) {$ rang = rand (333,8888); $ url = "http://im.uxin.com: 8887/login? Sn = ". $ rang. "& account = ". $ v [0]. "& pwd = ". md5 ($ v [1]). "& pv = android & v = 2.8.4 & sign = ". md5 ($ rang. $ v [0]. "k1oET & Yh7 @ EQnp2XdTP1o/Vo = "). "& netmode = 1 & brand = Xiaomi & model = MI + 2SC & osv = 4.1.1 & imei = ". rand (Random, 99999 ). rand (Random, 99999 ). rand (Random, 99999); $ cont = httpreq ($ url, 1); if (strstr ($ cont, 'uid') {echo "login successful
";} Else {echo" logon failed
";}$ Url =" http://im.uxin.com: 8887/signin? Sn = ". $ rang. "& sign = ". md5 ($ rang. "k1oET & Yh7 @ EQnp2XdTP1o/Vo ="); $ content = json_decode (httpreq ($ url), true); // echo $ content ['content']; echo'
',var_dump($content),'
';} Unset ($ users); die () ;}?>


The deployment is successful, but the following error occurs when running the test:
"Fatal error: Call to undefined function curl_init () in/home/vcap/app/www/index. php on line 22"
This is the line:

        $ch = curl_init();

Shouldn't this be the case if I say something wrong?


The deployment is successful, but the following error occurs when running the test:
"Fatal error: Call to undefined function curl_init () in/home/vcap/app/www/index. php on line 22"
This is the line:

        $ch = curl_init();

Shouldn't this be the case if I say something wrong? ?? Your php curl model?

?? Your php curl model? The problem is that the same curl function can run normally before the code is replaced. This indicates that the curl module of my space is enabled.
This error is always reported after you replace it with the built-in account code... this error was reported during the test yesterday.

View phpinfo. php
Check whether curl extension is enabled

PHP generation ?? Yes ??, Yes ???,?? Is it your PHP? ??

PHP generation ?? Yes ??, Yes ???,?? Is it your PHP? ??
It should be my space problem. but it's strange that the code can be run without replacing it.
Thank you !! I will change the space to another day. thank you!

OK, or are you in Ben? Ann? Xampp ?? Integrated PHP? Is it possible ??

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.