Hi,

I'm not great with API's so I've had someone develop the below where tweets can be pulled in by a specific hashtag.Instead, it pulls in tweets from a specific user 'matt_test9' and the hashtag, 'testhashtag'. Is there any way I can modify this to pull in tweets from any user with the hashtag 'testhashtag'? Thanks, Matt

<?php
$con=mysql_connect('');mysql_select_db('',$con) or die('mysql_error()');$user = 'matt_test9';
$xml = simplexml_load_file("http://api.twitter.com/1/users/show.xml?screen_name=".$user);
$tot_tweet = (string) $xml->statuses_count;
$uri = "http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=".$user."&count=".$tot_tweet;
$raw = file_get_contents($uri);
$data = json_decode($raw);$length = count($data);

for($i=0; $i<=$length-1; $i++){
$tweet = $data[$i];
$qry= mysql_query("select tweet_id from tweets where tweet_id='".$tweet->id_str."'");
$rows= mysql_num_rows($qry);
$original_date = str_replace(",", " ", $tweet->created_at);
$date = explode(" ", $original_date);
$new_date = date("Y-m-d",strtotime($date[5]."-".$date[1]."-".$date[2]));
$created = $new_date." ".$date[3];
$link = false;
$video_tag = array();
foreach($tweet->entities->hashtags as $key => $value) {
$video_tag[] = $value->text;
if($value->text=="testhashtag"){
$link = true;
}
}
}
if(($key = array_search('m389dd4s', $video_tag)) !== false) {
unset($video_tag[$key]);
}
$tags = implode(", ", $video_tag);
$video_link = array(); $videos = "";
if($link == true){
foreach($tweet->entities->urls as $key => $video) {
$video_link[] = $video->expanded_url;
}
$videos = implode(", ", $video_link);
}