Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Grab_Adventures($username){
- $url = 'http://services.runescape.com/m=adventurers-log/rssfeed?searchName=' . $username;
- $ch = curl_init($url);
- curl_setopt( $ch, CURLOPT_POST, false );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7");
- curl_setopt( $ch, CURLOPT_HEADER, false );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- $data = curl_exec($ch);
- $x = new SimpleXmlElement($data);
- foreach($x->channel->item as $entry) {
- $entry_target = $entry->title;
- $entry_date = split('00', $entry->pubDate);
- $entry_description = $entry->description;
- echo '<div id="al_entry">' . $entry_target . "" . '</div>';
- echo '<div id="al_date">' . $entry_description . "" . '</div>';
- echo '<div id="al_date">' . $entry_date[0] . "" . '</div>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment