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

  • Home
  • SEARCH
  • 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 7631791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:26:39+00:00 2026-05-31T06:26:39+00:00

All, I have the following code: $c = curl_init(); curl_setopt($c, CURLOPT_URL, https://api.twitter.com/1/statuses/user_timeline.json?screen_name={$username}&count={$how_many}); curl_setopt($c, CURLOPT_RETURNTRANSFER,

  • 0

All,
I have the following code:

$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://api.twitter.com/1/statuses/user_timeline.json?screen_name={$username}&count={$how_many}");
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec($c);
curl_close($c);
if ( ! empty( $contents ) ) {
    // Decode it.
            echo "it is in here";
    $tweet = json_decode( $contents );
}

This code never gets into the if statement because it isn’t returning any results. Any idea on how to get this to return all of the results?

Thanks!

  • 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-31T06:26:42+00:00Added an answer on May 31, 2026 at 6:26 am

    Looks like your server doesn’t trust Twitter’s certificate authority (you’re probably getting an SSL error but not seeing it due to your error reporting settings).

    Follow this guide to get it working – http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

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

Sidebar

Related Questions

I have the following code: curl_setopt($ch, CURLOPT_URL, $host); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
I have the following code which I got from http://css-tricks.com/startstop-slider/ I have it all
I have the following code to zip all the files and then save it
I have the following code: // Obtain the string names of all the elements
I have the following code to assign a value to all the elements of
I have this following code which will return all the current semesters. How do
i have the following code def get(self): date = datetime.date.today() loc_query = Location.all() last_cursor
I have a following code , I want to display all the attributes of
So I have the following code for fetching all of my core data entities
I have the following code where I have collected all the file sizes greater

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.