Script Cubis weekly

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Script Cubis weekly

    That's fine, I see you're explaining crontab, and I think I can safely say anyone who's been here a while already knows about it anyway...

  2. #27
    Genesis?Is it a new drug? renan7899 is offline
    MemberRank
    Apr 2010 Join Date
    BrazilLocation
    519Posts

    Re: Script Cubis weekly

    Matheusben said: "Tutorial Please install that script please :S no understood crontab :s"

    ...

  3. #28
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Script Cubis weekly

    I know

    ...

  4. #29
    Genesis?Is it a new drug? renan7899 is offline
    MemberRank
    Apr 2010 Join Date
    BrazilLocation
    519Posts

    Re: Script Cubis weekly

    And you said: "anyone who's been here a while already knows about it anyway..."

    '-'

  5. #30
    Enthusiast matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    renan7899 Mano desblock msn la.

  6. #31
    Genesis?Is it a new drug? renan7899 is offline
    MemberRank
    Apr 2010 Join Date
    BrazilLocation
    519Posts

    Re: Script Cubis weekly

    Quote Originally Posted by Adriana View Post
    zen.php
    PHP Code:
    <?php



        $Host 
    "localhost" ;  // localhost or your IP
        
    $User "root";  // Database user
        
    $Password "root";  // Database password
        
    $Name "dbo";  // Database name
        
    $Amount = ;  // how much zen you want to add *100

        
        
    $Link MySQL_Connect($Host$User$Password) or die ("<HTML><BODY><center><b>The server is momentarily down please try again after 5 minutes!</b></BODY></HTML>");
        
    MySQL_Select_Db($Name$Link) or die ("<HTML><BODY><center><b>The server is momentarily down please try again after 5 minutes!</b></BODY></HTML>");        


        
    $prepare_w "SELECT ID FROM users ORDER BY ID ASC, ID ASC";
        
    $execute_w mysql_query($preparew);
        
    $top_num =0;
        
        
        while (
    $data mysql_num_rows($execute_w))
        {
                    
    $top_num++;
        
            
    $uweb "call usecash ($data["ID"] , 1, 0, 1, 0, $Amount, 1, @error)";
            
    $resu mysql_query($uweb);
            
    $QWE mysql_fetch_array($resu);

        }

    echo 
    "Updated $top_num Rows";
    mysql_close($Link);
    ?>
    Crontab:


    nono /etc/crontab


    add a line like this:
    * * * * 6 root /usr/bin/wget http://localhost/zen.php -q > /dev/null

    PHP Code:
    # Example of job definition:
    # .---------------- minute (0 - 59)
    # |  .------------- hour (0 - 23)
    # |  |  .---------- day of month (1 - 31)
    # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
    # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
    # |  |  |  |  |
    # *  *  *  *  *  command to be executed
    #<----------------------------------------------Start--------------------------------------->
    * * * * 6 root /usr/bin/wget http://localhost/zen.php -q > /dev/null 

    This scrip this not tested but i think it might work.

    I checked your script... there are some things unnecessary, and there are some errors too. "mysql_query(preparew)"... It should be "mysql_query(prepare_w)" (With a underline).


    I'll remake the script here:
    PHP Code:
    <?php
    error_reporting
    (0); //I don't like this crap reporting my server IP... the mysql errors is enough for the users.


        
    $Host "192.168.1.64";  // localhost or your IP
        
    $User "root";  // Database user
        
    $Password "renan";  // Database password
        
    $Amount "45000";  // how much zen you want to add *100

        
        
    $Link mysql_connect($Host$User$Password) or die ("<center><b>Database connection error.</b>");    
        
    $dbc mysql_select_db("dbo"$Link) or die(mysql_error());

        
    $prepare_w mysql_query("SELECT * FROM users ORDER BY ID ASC") or die (mysql_error());
        
    $top_num 0;
        
        
    $data date("Y/m/d H:i:s");
        
        
    $query_sn "SELECT sn FROM usecashnow";
        
    $sn mysql_query($query_sn);
        
        if(
    mysql_num_rows($sn) <= 0) { $sn "-1"; }
        
        while(
    $array mysql_fetch_array($prepare_w))
        {
            
    $id $array["ID"];
                    
    $top_num++;
        
            
    $uweb mysql_query("INSERT INTO usecashnow (userid, zoneid, sn, aid, point, cash, status, creatime) VALUES ('$id', '1', '$sn', '1', '0', '$Amount', '1', '$data')") or die (mysql_error());
        
    $sn--;
        }

    echo 
    "Updated $top_num Rows";
    mysql_close($Link);
    ?>
    Last edited by renan7899; 27-08-11 at 04:15 PM.

  7. #32
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Script Cubis weekly

    i made this now i dont use cubi ^^ but ty

  8. #33
    Enthusiast matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    There's an error...

    .

    The php file was splitted in a lot of parts... why??



Page 2 of 2 FirstFirst 12

Advertisement