query_first("SELECT tag FROM bb".$n."_city1 WHERE cityid = '1'"); $tag = $temptag['tag']; $contextOptions = array("http" => array ("header" => "Cookie: X-Mc-Ref=1;expires=1;path=/\r\n")); $context =stream_context_create($contextOptions); $url = @file_get_contents ("http://".$cityname.".myminicity.com",false, $context); $kPos = strpos($url, "&k=") +3; $k = substr($url, $kPos, 5); $source = @file_get_contents("http://".$cityname.".myminicity.com/xml"); $file = $cityname.'_myminicity.xml'; file_put_contents($file, file_get_contents('http://'.$cityname.'.'.$extension.'/xml')); $city = simplexml_load_file($file); $platz = $city->ranking; $user = $city->population; $geld = number_format($city->incomes,0, ",", "."); $alg = $city->unemployment; $transe = $city->transport; $crime = $city->criminality; $dreck = $city->pollution; $com = $city->bases[com]; $env = $city->bases{env}; $ind = $city->bases{ind}; $sec = $city->bases{sec}; $tra = $city->bases{tra}; $inhalt ="\"Einwohner\"Hier kannst Du einen - Einwohner stiften"; if ($city->unemployment == 0){ if ($city->population >=50){ $algtxt = "Alles OK"; } else { $algtxt = "Nicht genügend Einwohner"; } $inhalt .= " \"Fabrik\"$algtxt"; } else { $inhalt .= " \"Fabrik\"Hier kannst Du eine   - Fabrik stiften"; } if ($city->transport == 100){ if ($city->population >=100){ $transtxt = "Alles OK"; } else { $transtxt = "Nicht genügend Einwohner"; } $inhalt .= " \"Transportwesen\"$transtxt"; } else { $inhalt .= " \"Transportwesen\"Hier kannst Du eine   - Straße stiften"; } if ($city->criminality == 0){ if ($city->population >=300){ $crimetxt = "Alles OK"; } else { $crimetxt= "Nicht genügend Einwohner"; } $inhalt .= "\"Sicherheit\"$crimetxt"; } else { $inhalt .= "\"Sicherheit\"Hier kannst Du einen - Polizisten stiften"; } if ( $city->pollution == 0 ) { if ($city->population >=500){ $drecktxt = "Alles OK"; } else { $drecktxt = "Nicht genügend Einwohner"; } $inhalt .= "\"Umweltschutz\"$drecktxt "; } else { $inhalt .= "\"Umweltschutz\"Hier kannst Du einen - Baum stiften"; } if ( $city->population >= 1000 ) { $inhalt .= "\"Shop\"Hier kannst Du einen - Shop eröffnen"; } eval ("\$tpl->output(\"".$tpl->get("citya")."\");"); ?>