Php Help Needed
#1

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 ?
Reply
#2

REMOVED Actually. Its too long to write.

Basically just use timestamp or datetime however as thats all your really need.
Reply
#3

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 ?
Reply
#4

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 ^.
Reply
#5

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
Reply
#6

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
Reply
#7

In the time its taken you to wait for the answer, you prob could have found it by now
Reply
#8

http://stackoverflow.com/questions/1...ago-2-days-ago
or if you just want a file: https://github.com/jimmiw/php-time-ago
Reply
#9

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
PHP код:
    imagettftext($im120380110$black$font2$record->timeAgoInWords("LastOn"));//this is not working
    
imagettftext($im120276100$purple$font2$record->Level); 
Reply
#10

Well, no shit. Look at what you need to pass along to the function and what you passed along.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)