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 7637559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:58:19+00:00 2026-05-31T07:58:19+00:00

I found this code (full version here http://blog.loicg.net/developpement-web/lire-twitter-stream-php-curl ) function read_the_stream($sTrackingList){ $ch = curl_init();

  • 0

I found this code
(full version here http://blog.loicg.net/developpement-web/lire-twitter-stream-php-curl)

function read_the_stream($sTrackingList){
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_URL,'https://stream.twitter.com/1/statuses/filter.json');
 curl_setopt($ch,CURLOPT_USERPWD,TWITTER_LOGIN.':'.TWITTER_PASSWORD);
 curl_setopt($ch, CURLOPT_NOBODY, 0);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_USERAGENT, '');
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
 curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Twitter-Client: ItsMe','X-Twitter-Client-Version: 0.1','X-Twitter-Client-URL: http://rien.net/'));
 curl_setopt($ch, CURLOPT_POST, true);
 curl_setopt($ch, CURLOPT_POSTFIELDS,"track=".$sTrackingList);
 curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'write_callback');

 curl_exec($ch);
 curl_close($ch);
}

It’s work for me but now i don’t know how to stop it (for making test it’s horrible, my new php file not interpreted!)

  • 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-31T07:58:20+00:00Added an answer on May 31, 2026 at 7:58 am

    You should either put this code inside a script that is not executed on a webpage (like a daemon) or you should not use the stream.

    If you want to get only 100 tweets, then use some of the other twitter API for that.

    If you want a stop button, consider:

    • have your other script populate some database (or a queue like redis or ActiveMQ) and then you can have your webpage get your own stream using AJAX
    • Simply using AJAX to call a script that reads the feeds.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
I found this code on the website http://rosettacode.org/wiki/Closest-pair_problem and I adopted the C# version
I found this code here class Usable; class Usable_lock { friend class Usable; private:
I found this via google: http://www.mvps.org/access/api/api0008.htm '******************** Code Start ************************** ' This code was
Here I found this code: import java.awt.*; import javax.swing.*; public class FunWithPanels extends JFrame
I just found this code in reflector in the .NET base libraries... if (this._PasswordStrengthRegularExpression
I found this code on here from this post: jQuery Accordion: links don't work
i found this code: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource hwndSource =
I found this code using Google. private int RandomNumber(int min, int max) { Random
I found this code for alphanumeric check (Letters, numbers, spaces or underscores) but I

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.