Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. * * * * * /usr/bin/php /opt/app/current/record_user_login.php
  2.  
  3. "Could not open input file"
  4.  
  5. <?
  6. include("connect_to_mysql.php");
  7.  
  8. //Logged in in 1 week
  9. $current_date = date('Y-m-j H:i:s', strtotime("-1 weeks"));
  10.  
  11. $query = "SELECT DISTINCT user_id FROM users_login_history WHERE sign_in_time > '$current_date'";
  12. $result = mysql_query($query) or die(mysql_error());
  13. $i = 0;
  14. while($row = mysql_fetch_array($result)){
  15. $i++;
  16. }
  17. $query = "INSERT INTO sqm_data (feature, action) VALUES ('user login', $i)";
  18. if(!mysql_query($query)) {
  19. die('Error: ' . mysql_error());
  20. }
  21. ?>
  22.  
  23. * * * * * cd /var/www/html/cron/; /usr/bin/php /var/www/html/cron/filename.php -q -f
  24.  
  25. * * * * * /usr/bin/php -q /opt/app/current/record_user_login.php
  26.  
  27. * * * * * php -q /opt/app/current/record_user_login.php
  28.  
  29. php -q -f /home/skat_2347/public_html/cron.php /home/skat_2347/public_html/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement