// Retrieves guild information from fc webserver
function guild_bio()
{
global $login_dimension,$guild_id;
$handle = fsockopen("216.74.158.92", 80, $errno, $errstr, 3);
if($handle)
{
fputs($handle,"GET /org/stats/d/$login_dimension/name/$guild_id/basicstats.xml HTTP/1.1\r\nConnection: Close\r\n\r\n");
while(!feof($handle))
{
$info .= fgets($handle,4096);
}
fclose($handle);
$guild[name] = guild_data($info,"<nickname>","</nickname>");
$guild[rank_id] = guild_data($info,"<rank>","</rank>");
$guild[rank_name] = guild_data($info,"<rank_name>","</rank_name>");
$guild[level] = guild_data($info,"<level>","</level>");
$guild[profession] = guild_data($info,"<profession>","</profession>");
$guild[gender] = guild_data($info,"<gender>","</gender>");
$guild[breed] = guild_data($info,"<breed>","</breed>");
}
else
{
$guild = false;
}
return $guild;
}
The code aint from bebot, well is the first platform bebot had too i think, anyway, since FC changed theyr sites, i couldnt get this to work anymore. I dont really understand how this fsockopen works, well i tryd load and loads of ways to make it work, but it only either wipes whole db or saying cant connect. Even If i put full name, or ip. Maybe someone has a better way of handling this.