Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Wyswietlanie tekstu oraz wykonywanie czynnosci
Faden
post
Post #1





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 9.03.2017

Ostrzeżenie: (0%)
-----


  1. {
  2. //Sprawdzacz kodu
  3. $id = $shop['id'];
  4. $number = $offer[$offerId]['number'];
  5. $ch = curl_init("http://api.panelmh.mintshost.pl/".$id."/".$number."/".$check."/".$nick); //inicjacja curla
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. $json = curl_exec($ch); //pobieranie treści strony
  8. curl_close($ch); //zamykanie curla
  9. $json = json_decode($json);
  10. if( empty($check) || empty($nick) )
  11. $message = "Please fill all fields.";
  12. else if( preg_match('/[^0-9A-Za-z]/', $check) )
  13. $message = "Entered code is not valid.";
  14. else if( $json['code'] != 200 )
  15.  
  16. $message = "Entered code is not valid.";
  17. else
  18. {
  19. $xml = simplexml_load_file($file);
  20. $xml['banned'] = 0;
  21. $xml->ban['banned'] = 0;
  22. $xml->ban['banstart'] = 0;
  23. $xml->ban['banend'] = 0;
  24. $xml->ban['reason'] = "";
  25. $xml->ban['action'] = "";
  26. $xml->ban['deleted'] = 0;
  27. $xml->ban['finalwarning'] = 0;
  28. $xml->ban['namelock'] = 0;
  29. $xml->asXML($file);
  30. $message = "You have been unbanned.";
  31. }
  32. }
  33. else
  34. $message = "<font color='red'><b>This character do not exists!</b></font>";
  35. }



Hej. Wiecie może dlaczego nie wyświetla mi żadnych komunikatów oraz nie wykonuje czynności w xmlu?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 05:23