AJAX and XML - Populating a textarea

gasakit

New Member
i have the following code which pulls a user's twitters' followers. \[code\]<?php$follower_url = "http://api.twitter.com/1/statuses/followers/Mozammil_K.xml";$twFriends = curl_init();curl_setopt($twFriends, CURLOPT_URL, $follower_url);curl_setopt($twFriends, CURLOPT_RETURNTRANSFER, TRUE);$twiFriends = curl_exec($twFriends);$response = new SimpleXMLElement($twiFriends);foreach($response->user as $friends){ $thumb = $friends->profile_image_url; $url = $friends->screen_name; $name = $friends->name; }?>\[/code\]As you can see, it pulls the twitter followers from an XML file located at http://api.twitter.com/1/statuses/followers/Mozammil_K.xmlWhat i want to achieve is this :1) The user can invite their followers to a chat room. So each time he types their names into a text area, it should suggest the follower names from the XML file. 2) When he types a comma, it should stop suggesting and on typing the @ it should start suggesting again. Comma acts as a delimeter here. 3) Then, all the data from the text area should be sent to the database. (This is fairly easy)How do i achieve 1 and 2? Can somebody point me in the right direction?
 
Back
Top