Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5998841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:27:48+00:00 2026-05-23T00:27:48+00:00

lets say we do some search useing search api then it retuns something like

  • 0

lets say we do some search useing search api then it retuns something like this in json.

  'results' => 
    array
      0 => 
        object(stdClass)[9]
          public 'from_user_id_str' => string '57393273' (length=8)
          public 'profile_image_url' => string 'http://a1.twimg.com/profile_images/1150792547/49146_1365401218_7951632_q_normal.jpg' (length=83)
          public 'created_at' => string 'Mon, 06 Jun 2011 04:01:36 +0000' (length=31)
          public 'from_user' => string 'primalokomotif' (length=14)
          public 'id_str' => string '77585906684526592' (length=17)
          public 'metadata' => 
            object(stdClass)[10]
              public 'result_type' => string 'recent' (length=6)
          public 'to_user_id' => null
          public 'text' => string 'RT @detikcom kober siap perkenalkan ajaran klub suami suami takut istri' (length=71)
          public 'id' => float 7.7585906684527E+16
          public 'from_user_id' => int 57393273
          public 'geo' => null
          public 'iso_language_code' => string 'id' (length=2)
          public 'to_user_id_str' => null
          public 'source' => string '<a href="http://mobile.twitter.com" rel="nofollow">Mobile Web</a>' (length=97)
      1 => 
        object(stdClass)[11]
          public 'from_user_id_str' => string '278060132' (length=9)
          public 'profile_image_url' => string 'http://a1.twimg.com/profile_images/1355377589/296218442_normal.jpg' (length=66)
          public 'created_at' => string 'Mon, 06 Jun 2011 04:01:34 +0000' (length=31)
          public 'from_user' => string 'kaka_kecil' (length=10)
          public 'id_str' => string '77585897637412864' (length=17)
          public 'metadata' => 
            object(stdClass)[12]
              public 'result_type' => string 'recent' (length=6)
          public 'to_user_id' => null
          public 'text' => string 'RT @detikcom: 'Milan Tak Pernah Inginkan Hamsik' http://de.tk/dP7Cs via @detiksport' (length=83)
          public 'id' => float 7.7585897637413E+16
          public 'from_user_id' => int 278060132
          public 'geo' => null
          public 'iso_language_code' => string 'id' (length=2)
          public 'to_user_id_str' => null
          public 'source' => string '<a href="http://ubersocial.com" rel="nofollow">ÜberSocial</a>' (length=94)
      2 => 
        object(stdClass)[13]
          public 'from_user_id_str' => string '185984810' (length=9)
          public 'profile_image_url' => string 'http://a0.twimg.com/profile_images/1368466468/a_normal.jpg' (length=58)
          public 'created_at' => string 'Mon, 06 Jun 2011 04:01:31 +0000' (length=31)
          public 'from_user' => string 'tiayeeeaah' (length=10)
          public 'id_str' => string '77585887143276544' (length=17)
          public 'metadata' => 
            object(stdClass)[14]
              public 'result_type' => string 'recent' (length=6)
          public 'to_user_id' => null
          public 'text' => string 'hmm..hmm.. -___-" RT @detikcom: Bandung Siap Perkenalkan Ajaran Klub Istri Taat Suami http://bit.ly/kCcOsG' (length=111)
          public 'id' => float 7.7585887143277E+16
          public 'from_user_id' => int 185984810
          public 'geo' => null
          public 'iso_language_code' => string 'id' (length=2)
          public 'to_user_id_str' => null
          public 'source' => string '<a href="http://seesmic.com/seesmic_desktop/sd2" rel="nofollow">Seesmic Desktop</a>' (length=115)
      3 => etc

how can we return arrays that have date less then one hour ? or filter it? maybe something like do a search then returns all the array that have strtotime(created_at) < strtotime(“+1 Hours”)

*edit

like How can I use the Twitter Search API to return all tweets that match my search query, posted only within the last five seconds?
but there is no answer doing this.

thanks for looking in

Adam Ramadhan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:27:48+00:00Added an answer on May 23, 2026 at 12:27 am

    So, you’re looking to return only those that have created_at within the past hour? I like to use array_filter() when I can.

    function filterWithinHour($obj)
    {
        return (strtotime($obj->created_at) > strtotime('-1 hour'));
    }
    
    $recent = array_filter($results, 'filterWithinHour');
    

    If you ever need need to pass it a certain time (instead of assuming now), you might want to just loop through the array manually rather than mess with trying to pass a time parameter to the callback with a global variable. I hate globals used like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So lets say I've added some prototype methods to the Array class: Array.prototype.containsKey =
Lets say I have a simple 1D array with 10-20 entries. Some will be
Lets say we have some discrete distribution with finite number of possible results, is
Lets say we have some basic AR model. class User < ActiveRecord::Base attr_accessible :firstname,
Lets say you need to attach some JavaScript functionality to an ASP.NET User Control
Lets say I need to write several functions processing some data. These functions are
Lets say I have one row with three columns - some buttons on left
Lets say I've a string and some font (name, size, etc...). How to get
Lets say you created a little Java Desktop app with a jar and some
Lets say I wanted to scrape a webpage, and extract some data. I'd most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.