I agree with the "over coding" statement but, this is certainly a good start. I urge looking further into the date() function (specifically the 'M' flag), as your last line could have been
Code
Also your suggestion about appending 'ago' will provide undesired results after 24 hours. (ex: May 22, 2013 ago).
Sidenote: I've made a similar function some time ago here, if you'd like a friendly reference :) I hope to see more PHP contributions!
Not bashing on you, but you're overcoding. you could've floored the $stamp and then divide that value to get days, hours, mins and seconds. But i guess your way works as well :)
As far i analyzed its not a relay chat. Every message is stored into MySQL Database. So when you connect to the room you can see all messages has been sent to the room, My guess or you can see whatever is posted after your join... Its basically simple and neat. Haven't tested but from the code even its messy seems fine.
Can you tell us a little bit about it? What's it connect to? How does it work? etc..
Having such a bland description isn't going to inspire many to check it out if we don't know what it can do.
I have the title part working on my site,I used [if($category) print $category; if($subcategory) print $subcategory; print $title;] so that it would diplay $title before anyone clicked on $category or $subcategory. The value of $title is Products, so it just prints after $category or $subcategory is clicked, so my title becomes Art($category)Products($title).
My problem is that each page is loaded inside of my header as page1.html. All listings on the page are from $category or $subcategory. I'm not sure how to go about getting the keywords part to work. I don't need keywords for every page, just $category or $subcategory.
Your welcome to look at my site to see what I'm talking about.
the point is that my site uses a single page name and #xyz to show different content (but really they are different pages), a lot of sites do this now in order to avoid reloading and displaying content faster. but the problem indeed is that this page has a unique meta data right now. these are really different pages, but they are all under a single php file. for example gmail does this too: https://mail.google.com/mail/u/0/?shva=1#inbox
@pleb You'll probably need to reload the page with the anchor appended as a query string, but I'm not sure what your ultimate goal is. Anchors usually represent a particular point on a page and not a full page in itself. They're for browsers and not for spiders, so meta tags that are dependent on anchors don't make sense.
But so now, how do I capture what is returned in the anchor and add it the my page name (index.php in get_meta.php so that it gets the full URL (index.php#home? should I define it inside $page = ?
Hi Hawkee,
Running in a problem as my page is unique but shows different content using the # tag: index.php#home , index.php#contact etc...
I got it working on index.php but can't figure out how to structure get_meta and the data file to make it look at #home instead of just index.php
Description Also Updated. All Functions are now accessible through $ Symbol like mIRC Style.
Be aware. They Opening and Closing Brackets () are required. Otherwise it will return the function name.
Once you include this file $time will be set to the time that you included the file, but it will not change. So if you check it 5 minutes later it'll still reflect the original time.