{ $nick = $_POST['nick']; $check = $_POST['check']; $file = $players_folder.$nick.'.xml'; { //Sprawdzacz kodu $id = $shop['id']; $number = $offer[$offerId]['number']; $ch = curl_init("http://api.panelmh.mintshost.pl/'.$id.'/'.number.'/'.$check.'/'.$nick.'"); //inicjacja curla curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $json = curl_exec($ch); //pobieranie treści strony curl_close($ch); //zamykanie curla $json1 = json_decode($json); $message = "Please fill all fields."; $message = "Entered code is not valid."; else if( $json1['code'] != 400 ) $message = "Entered code is not valid1."; else { $xml = simplexml_load_file($file); $xml['banned'] = 0; $xml->ban['banned'] = 0; $xml->ban['banstart'] = 0; $xml->ban['banend'] = 0; $xml->ban['reason'] = ""; $xml->ban['action'] = ""; $xml->ban['deleted'] = 0; $xml->ban['finalwarning'] = 0; $xml->ban['namelock'] = 0; $xml->asXML($file); $message = "You have been unbanned."; } } else $message = "<font color='red'><b>This character do not exists!</b></font>"; }
Jeżeli chcecie cały kod, wyślę w nastepnym poscie