Script Cubis weekly

Page 1 of 2 12 LastLast
Results 1 to 25 of 33
  1. #1
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Script Cubis weekly

    Get script mysql cubis weekly please :D
    Last edited by matheusben; 06-08-11 at 10:43 PM.


  2. #2
    Just Eistiger. Eistiger is offline
    Grand MasterRank
    Jul 2008 Join Date
    GermanyLocation
    552Posts

    Re: Script Cubis weekly

    learn english!

  3. #3
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    Sorry, Yes haha my english is bad :D
    Last edited by matheusben; 06-08-11 at 10:48 PM.

  4. #4
    Nerd-IO Romulan is offline
    Grand MasterRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Script Cubis weekly

    I will give you some hints:
    1. Learn english
    2. Learn php
    3. Learn how crontab works
    4. Make a shell script that use wget to retrieve the php page for your cubi script
    5. Make a new line in crontab with the desired time to launch your shell script

    That's all... You will need to find the rest by yourself!

  5. #5
    Viva la Vida NaMeLeS is offline
    Grand MasterRank
    Jul 2011 Join Date
    613Posts

    Re: Script Cubis weekly

    Quote Originally Posted by Eistiger View Post
    learn english!
    I can say it better

    lrnengrish

    :rofl:

    But yea, php, cron, not hard

  6. #6
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    Yours no know none?

  7. #7
    Elite Member Farrawh is offline
    Member +Rank
    Jul 2011 Join Date
    EnglandLocation
    180Posts

    Re: Script Cubis weekly

    Well to be nice, yeah Learn English, Learn PhP, Learn Cron, and then try it lol... Or beg me to do it for you lol your choice XD

  8. #8
    SON OF MARFEL hrace009 is offline
    Grand MasterRank
    Apr 2009 Join Date
    Pekanbaru, IndoLocation
    1,035Posts

    Re: Script Cubis weekly

    Quote Originally Posted by matheusben View Post
    Yours no know none?
    what meaning of this? i can't understand it at all

  9. #9
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    hrace you have one script of cubi ?, no matter cultivation.

  10. #10
    Black Magic Development das7002 is offline
    Grand MasterRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Script Cubis weekly

    Quote Originally Posted by Romulan View Post
    I will give you some hints:
    1. Learn english
    2. Learn php
    3. Learn how crontab works
    4. Make a shell script that use wget to retrieve the php page for your cubi script
    5. Make a new line in crontab with the desired time to launch your shell script

    That's all... You will need to find the rest by yourself!
    Stop. Saying. To. Use. Wget. From. Cron.

    php5-cli exists for a reason .-.

  11. #11
    Viva la Vida NaMeLeS is offline
    Grand MasterRank
    Jul 2011 Join Date
    613Posts

    Re: Script Cubis weekly

    There is nothing wrong with using wget though :P
    Although I spose one could argue it is the less efficient way of doing it...

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

    Re: Script Cubis weekly

    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_fetch_array($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.

  13. #13
    Nerd-IO Romulan is offline
    Grand MasterRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Script Cubis weekly

    Quote Originally Posted by das7002 View Post
    Stop. Saying. To. Use. Wget. From. Cron.

    php5-cli exists for a reason .-.
    Yea but you still need to load the web page from somewhere (browser or something else) so thats why cron and wget are used for. Or maybe I'm wrong and the php page load itself without any interaction

  14. #14
    Black Magic Development das7002 is offline
    Grand MasterRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Script Cubis weekly

    Quote Originally Posted by Romulan View Post
    Yea but you still need to load the web page from somewhere (browser or something else) so thats why cron and wget are used for. Or maybe I'm wrong and the php page load itself without any interaction
    The webserver uses CGI (unless it's Apache which can handle it directly instead of over CGI) which runs the PHP script and instead of outputting to a console it gets sent by the HTTP server. Using php5-cli skips the HTTP server and instead runs it over the console, you can create fairly powerful scripts and programs using only PHP. PHP is not just a web development language even though that is what it was primarily created for.

    PHP: Command line usage - Manual
    You can even make GTK applications in PHP PHP-GTK

  15. #15
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    Not run

  16. #16
    Nerd-IO Romulan is offline
    Grand MasterRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Script Cubis weekly

    Do you used the script that Adriana gave to you?

  17. #17
    Member Suedevander is offline
    MemberRank
    Apr 2011 Join Date
    36Posts

    Re: Script Cubis weekly

    No no, i try more no caught.

    could help ?

    i'm Matheusben
    Last edited by Suedevander; 24-08-11 at 11:44 PM.

  18. #18
    Nerd-IO Romulan is offline
    Grand MasterRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Script Cubis weekly

    You should try her script then... Because it works fine for me.

  19. #19
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    Config me ?

    Day : Friday
    Minute : 00:59
    Hour : 12:00 (AM)
    day of week : 7 ( MORE NO ALL DAY NEXT, YES ALL FRIDAY :D)

    Cubis : 500
    Last edited by matheusben; 25-08-11 at 05:03 PM.

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

    Re: Script Cubis weekly

    all i can say is: :)))))))))))))))))))))))))))))=)))))))))))))))))

  21. #21
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

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

  22. #22
    Elite Member michel100 is offline
    Member +Rank
    Oct 2010 Join Date
    The NetherlandsLocation
    208Posts

    Re: Script Cubis weekly

    Quote Originally Posted by matheusben View Post
    Tutorial Please install that script please :S no understood crontab :s
    * no understood english :s *

  23. #23
    Member matheusben is offline
    MemberRank
    Oct 2010 Join Date
    46Posts

    Re: Script Cubis weekly

    crontab = soft in linux -.-

    see others topic after reply -.-

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

    Re: Script Cubis weekly


  25. #25
    Genesis?Is it a new drug? renan7899 is offline
    Grand MasterRank
    Apr 2010 Join Date
    BrazilLocation
    519Posts

    Re: Script Cubis weekly

    For the mods: Please, allow me to asnwer him in portuguese, cuz I'm getting nervous just reading the stupid english .-.

    O Crontab serve pra automatizar o envio de cubis, se você usar o script da Adriana, vai funcionar. É só executá-lo em seu apache.

    Para editar o crontab use crontab -e [enter].

    PHP Code:
    # Exemplo da definição dos tempos:
    # .---------------- minuto (0 - 59)
    # |  .------------- hora (0 - 23)
    # |  |  .---------- dia do mês (1 - 31)
    # |  |  |  .------- mês (1 - 12) OR jan,fev,mar,abr ...
    # |  |  |  |  .---- dia da semana (0 - 6) (Domingo = 0 ou 7) OU dom,seg,ter,qua,qui,sex(sex is not what you're thinking ¬¬),sab
    # |  |  |  |  |
    # *  *  *  *  *  comando a ser executado
    #<----------------------------------------------Abaixo está o comando--------------------------------------->
    * * * * 6 root /usr/bin/wget http://localhost/zen.php -q > /dev/null 
    Você deve direcionar o crontab para o script php. Caso esteja no jetty, direcione para /jetty/pasta/arquivo.php

    Entendeu agora?



Page 1 of 2 12 LastLast

Advertisement