Php Help Needed - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Php Help Needed (
/showthread.php?tid=540272)
Php Help Needed -
Hostoxide - 03.10.2014
I want to show that in php player last login in Seconds,Minutes,Hours,days
How i do it on php
Im added on database hh : mm : ss dd/mm/yyyy
Like
LastOn : 1 Minutes ago
Can anyone help me please ?
Re: Php Help Needed -
IceCube! - 03.10.2014
REMOVED Actually. Its too long to write.
Basically just use timestamp or datetime however as thats all your really need.
Re: Php Help Needed -
Hostoxide - 03.10.2014
Quote:
Originally Posted by IceCube!
REMOVED Actually. Its too long to write.
Basically just use timestamp or datetime however as thats all your really need.
|
Can you give me that code in pastebin ?
Re: Php Help Needed -
IceCube! - 03.10.2014
Not really... This may be inaccurate as it's on my mobile hence why I gave up. (Fucking auto correct),
Код:
$last_online = MYSQL Shit here.
$time_since_online = time() - $last_online
$minutes = $time_online/60
I also haven't used PHP in ages, and I'm not sure if thats the right Syntax, etc. You would need to expand on that, that is the basic ^.
Re: Php Help Needed -
TakeiT - 03.10.2014
You should check out stockOverflow. They have a lot of shit like that. I made something like that for a control panel, but I don't remember where it is, and tbh, it's a pain to type :P
Re: Php Help Needed -
Hostoxide - 03.10.2014
Quote:
Originally Posted by TakeiT
You should check out stockOverflow. They have a lot of shit like that. I made something like that for a control panel, but I don't remember where it is, and tbh, it's a pain to type :P
|
I need it for Signature
Re: Php Help Needed -
kaisersouse - 03.10.2014
In the time its taken you to wait for the answer, you prob could have found it by now
Re: Php Help Needed -
mamorunl - 03.10.2014
http://stackoverflow.com/questions/1...ago-2-days-ago
or if you just want a file:
https://github.com/jimmiw/php-time-ago
Re: Php Help Needed -
Hostoxide - 03.10.2014
Quote:
Originally Posted by mamorunl
|
PHP код:
imagettftext($im, 12, 0, 380, 110, $black, $font2, $record->timeAgoInWords("LastOn"));//this is not working
imagettftext($im, 12, 0, 276, 100, $purple, $font2, $record->Level);
Re: Php Help Needed -
mamorunl - 03.10.2014
Well, no shit. Look at what you need to pass along to the function and what you passed along.