CodeCanyon

Code help

45 posts
  • Bought between 50 and 99 items
  • Has been a member for 3-4 years
Gamerholic says

Anyone know how I can echo this as 00:00:00 (hour min second) It’s a countdown timer

$strFind="SELECT TIMESTAMPDIFF(SECOND, now(), sdate) AS mtime FROM `penny` WHERE `id`=\"$pid\"";
$result=mysql_query($strFind) or die(mysql_error());
$row=mysql_fetch_array($result);
$stime=$row['mtime'];
2333 posts
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Elite Author
  • Contributed a Blog Post
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 4-5 years
+8 more
dtbaker moderator says

There are a few ways to convert seconds to hour:minute:second format. An easy place to start is with the date() command.

echo date('H:m:s',$stime); 

as long as your stime is under 24 hours then you will be ok.

45 posts
  • Bought between 50 and 99 items
  • Has been a member for 3-4 years
Gamerholic says

There are a few ways to convert seconds to hour:minute:second format. An easy place to start is with the date() command.
echo date('H:m:s',$stime); 
Tried that doesn’t work. http://www.dreamybids.com/auction.php?id=515

I could use a PHP API if you are affordable and up for some light work.

here are the details

1) I purchased this API code from code canyon http://codecanyon.net/item/simple-api-class/102420 and I also purchased this API frame work http://codecanyon.net/item/api-framework/140978

I’m looking to build an API for my site that calls to one table in my mysql database. It’s pretty simple. From my users table, other websites can credit or debit points to a member. Here’s how it’s structured.

Step 1) The user that wants to add my API to their websites, gets a “secret” and “key” from us.

Step 2) they add the API to their website, game, script whatever.

Step 3) they can then credit points to a member that signs up on their website, clicks their banner, plays their game etc.

When crediting points the API will check to see if he API owner has enough points in their account to credit. If they do, it will debit the points from their account and credit the points the the users account they are giving the points to (based on the users current session).

If the API owner doesn’t have enough points to give..throw error message.

This process also works in reverse, a user can give points to the api owner. So the API owner can say, buy this item and get 10% off in exchange for 10 points. When this happens, a pop up window will appear for the user to enter their email and password for verification before the amount is debited from their account and credited to the API owners account.

The API owner has to be able to set different debit and credit amounts per page, product, game etc. as long as your stime is under 24 hours then you will be ok.

by
by
by
by
by