Skip to content

Instantly share code, notes, and snippets.

@hipsterjazzbo
Created July 3, 2011 04:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hipsterjazzbo/1061957 to your computer and use it in GitHub Desktop.
Save hipsterjazzbo/1061957 to your computer and use it in GitHub Desktop.
Quick tweet curl
<?php
$query = 'weekendhacker';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://search.twitter.com/search.json?q=$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
$tweets = json_decode($json);
curl_close($ch);
var_dump($tweets);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment