View Single Post
Old 03-10-2009, 07:19 PM   #73 (permalink)
codeguy
The Wanderer
 
Join Date: Mar 2009
Location: Colorado
Posts: 6
Thanks: 0
codeguy is on a distinguished road
Default

Quote:
Originally Posted by commonmind View Post
And that's probably where I'm going wrong, because I'm literally just inputting that code (with the correct URL of my guild/server, of course) into the editor, saving it, and trying to view it.

To say I'm a novice would be an understatement. And again, excuse the extreme lack of basic knowledge here, I'm really trying to understand how this works, beyond simply getting it to function as others have on their respective guild sites.

If your not getting an error message when browsing to your php page, I'll assume you have curl compiled into php.

Your code doesn't look wrong, however, you never output the variable holding the results from the webserver. If the code you posted is exactly and completely your code, I understand why you see nothing.

Try this:

Code:
<?php 
$url = 'http://www.wowarmory.com/guild-info.xml?r=YOUR+SERVER&n=YOUR+GUILD&p=1';
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_USERAGENT,  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
    
    $rosterxml = curl_exec($ch);
    
    echo $rosterxml;  #ADDED
?>
codeguy is offline  
Reply With Quote