Jump to content

svenn

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by svenn

  1. Nm..just figured it out myself 2 minutes after posting
  2. Thanks alot for your quick reply will have a go at it as soon as i get back to the office Thanks!
  3. Hi guys Do you guys know if possible to open an external URL without actually displaying this to the user? We have a service where we wish to open an external URL which triggers sending out an SMS to the user. However..we cannot display the url opened to the user as it shows our username etc with the sms provider. basically the url looks like this: https://www.smsprovider.com/username=OurUsername&password=******&smsMsg_to_send=blablablablabla Is it possible to "trigger" this URL without letting our users see it? Thanks in advance for any help you may provide
  4. Hi Ok, seems I was wrong about the array contents.. it contains the following: Array ( [0] => stdClass Object ( [date_time] => 2011-03-16 08:36:11 ) [1] => stdClass Object ( [date_time] => 2011-03-17 04:29:05 ) Bleh....then perhaps I need to go about this issue in another matter? Tried the following: foreach($result as $results): $datoformat = date("Y-m-d", strtotime($results->date_time)); $datoformat = array_map('trim', $datoformat); $values = array_count_values($datoformat); $yesterday = date('Y-m-d', strtotime("-1 days")); $total = $values[$yesterday]; echo $total; But this yields an error: Warning: array_map() [function.array-map]: Argument #2 should be an array... Warning: array_count_values() expects parameter 1 to be array, null given...
  5. Hi, thanks for the quick reply At this point each element contains only a date : [yyyy-mm-dd]
  6. Hi guys I'm kinda stuck..so hopefully you guys can lend me a hand I've got an array containing date elements ("Y-m-d")... I'm trying to output some data into googlecharts..so i need to count how many elements that are in the array with todays date -1 day, todays date-2 days...todays date -3days etc... Up until a set number of days (for example 7 days, 14 days etc).. Any advice on how to go about to achieve this?
  7. Hi, My errorlog keep spamming the following errormsg: "PHP Notice: A non well formed numeric value encountered on line 365". This is the code it refers to: for ($yr = $year, $age = -1; mktime(0, 0, 0, $month, $day, (int)$yr) < $today; $yr++, $age++); It's supposed to calculate the owner of the page's age. The full code is: list($year,$month,$day) = explode("-", $birthday); $tempVar=list($year,$month,$day) = explode("-", $birthday); $today = time(); for ($yr = $year, $age = -1; mktime(0, 0, 0, $month, $day, (int)$yr) < $today; $yr++
  8. Brilliant!! I'd say I love you, but i'll restrain myself and say: Thank you so much!
  9. Hi I'm trying to figure out how to calculate how long since a datevariable I have stored is from whenever the page is loaded.. I currently have a stored datevariable in the format: YYYY-MM-DD H:m:s ... So basically what I wish to accomplish is figuring out whenever i load the page which has stored this variable, how much time has passed. I want it to show up as for example : '10 minutes ago'.. '1 hour 25minutes ago' if it's the same day.. if its more than 1 day old it's enough to show only the number of days.....'1week 3 days ago' etc etc
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.