Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.