Adham Mohamed

Apr 8, 2019 20:33
Thank so much @butlerblog, I added it before update_option( $option_name, $author_counts ); as you told me before the value is updated in the database.
Apr 8, 2019 20:33
Aha, I guess I misunderstand you :(, you unset any day that passed 8 days old, will be deleted, right?
Apr 8, 2019 20:33
Thanks again @butlerblog, I'm still using the new version, after your last update it's working now, Maybe i wasn't clear to explain what I really looking for, I want to clean up the data of the past day for recollecting the same IP again in the next day, So, if there is no one visiting this profile again, the value will decrease day after day to be 0, until someone visit this profile again, did you get it now?
Apr 8, 2019 20:33
Thanks a million @butlerblog, any hope to remove the old data?
Apr 8, 2019 20:33
Note: no problem to reset the table to 0 if there is no data of the non viewed profile at the last 7 days! I just need to get the total counter in the last 7 days as you did in the first version with data removal for each IP every day for re-collecting it again if he/she visited the same profile again in the next day, I hope I explained it well.
Apr 8, 2019 20:33
Hello @butlerblog, in the last comment i was using the new version because i really like to be every day within the last 7 days, but always get the value 0, but when i tested again the old version it's working :), but i need to be sure that the IP will removed every day for re-collecting the IPs again! and I really appreciated your help you are the best :).
Apr 8, 2019 20:33
I'm sorry :(, But the counter now is 0, and for sure there IPs into the option name!
Apr 8, 2019 20:33
Any new please @butlerblog, I don't know why the counter is 1 :(, as I said in the last two comments, I'm on the new version and the old version with the same issue, Thank you!
Apr 8, 2019 20:33
I'm on the new version of your snippet, and old version is the same count still 1.
Apr 8, 2019 20:33
Kindly check this is from db under the option name of my_author_counter6 a:4:{i:1554570945;s:10:"51.36.2.81";i:1554576938;s:10:"51.36‌​.2.81";i:1554576939;‌​s:10:"51.36.2.81";i:‌​1554578468;s:12:"89.‌​234.68.90";}
Apr 8, 2019 20:33
Thanks so much for your support, I tested it out but the count still 1 and I'm sure there are more IPs visited the same profile., so how can i fix that, Thank you!
Apr 8, 2019 20:33
Or you mean it will re-collect it again automatically after the -7 days?
Apr 8, 2019 20:33
Thanks so much @butlerblog, you make my day :), just a question, how can i use cookies for that to set and get and remove the unique ip every 24 hours, I mean if the same ip visit the same author page after 24 hours i need to re-collect it again as a new ip.