View Single Post
Old 03-28-2015, 03:31 AM  
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
here's what i did:

i've made imgct.sh file with this content:

#!/bin/bash
#imgct.sh
#FTP and CHMOD 755

find . -name "*.jpg" -or -name "*.gif" -or -name "*.png" | wc -l >ct.txt

exit

this file is in my /uploads/ folder inside wp-content

now in same folder i've made blank ct.txt file with 755 permissions

and as 3rd i've made displayct.php file with content:

<?php
//display count
//displayct.php
$imgct = fopen("ct.txt", "r") or die("Unable to open file!");
echo fread($imgct, filesize("ct.txt"));
fclose($imgct);
?>

where is fopen("ct.txt","r") i've put full path to /wp-content/uploads/

and as 4th step i've setup cron.

when i've opened displayct.php in my browser it remains blank, cron is working every 2minutes (testing) and cron sends me an emails with this content:

#imgct.sh
#FTP and CHMOD 755

find . -name "*.jpg" -or -name "*.gif" -or -name "*.png" | wc -l >ct.txt

exit

now what i did wrong?
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote