Ergebnis 1 bis 7 von 7

Thema: [✔] Neue API - Cannot use object of type stdClass as array

Baum-Darstellung

  1. #1
    Senior Avatar von Uranjitsu
    Registriert
    May 2016
    Beiträge
    210
    Gefällt mir!
    223
    Du gefällst: 158

    [✔] Neue API - Cannot use object of type stdClass as array

    Grüßt Euch,

    ich weiß jetzt, nicht ob es an mir liegt oder an der API. Ich gehe aber von Ersteres aus und bitte um Hilfe.
    Ich dachte das würde eventuell helfen, aber scheinbar kann eine Klasse nicht verwendet werden?

    Notice: file_get_contents(): Content-type not specified assuming application/x-www-form-urlencoded in D:\wamp\apache2\htdocs\xxx\includes\functions.php on line 112

    Fatal error: Uncaught Error: Cannot use object of type stdClass as array in D:\wamp\apache2\htdocs\ssbgv2\includes\functions.p hp:117 Stack trace: #0 D:\wamp\apache2\htdocs\xxx\game.php(40): filecryptCC('http://ul.to/te...', '7985f3f72278079...', 'abb076e3ec08f6b...') #1 {main} thrown in D:\wamp\apache2\htdocs\xxx\includes\functions.php on line 117
    PHP-Code:
    function filecryptCC($links$api$foldername)
    {
        
    define('YES'1);
        
    define('NO'0);
        
    $USE_SSL  true;
        
    $api_key  $api;
        
    $name     $foldername;
        
    $group    "";
        
    $mirror_1 $links;
        
    $postdata http_build_query(array(
            
    "fn"          => "containerV2",
            
    "sub"         => "create",
            
    "api_key"     => $api_key,
            
    "name"        => $name,
            
    "mirror_1"    => $mirror_1,
            
    "captcha"     => YES,
            
    "allow_cnl"   => YES,
            
    "allow_dlc"   => YES,
            
    "allow_links" => NO,
            
    "group"       => $group,
        ));
        
    $opts = array('http' => array(
            
    "method"  => "POST",
            
    "content" => $postdata,
        ));
        
    $context stream_context_create($opts);
        
    $result  file_get_contents('http' . (($USE_SSL) ? 's' '') . '://www.filecrypt.cc/api.php'false$context);
        if (!
    $result) {
            throw new 
    Exception("filecrypt.cc api down");
        } else {
            
    $json    json_decode($result);
            
    $fc_link $json->container[0]->link;
            
    $fc_simg $json->container[0]->bigimg;
        }

        
    $fc_array = array(
            
    $fc_link,
            
    $fc_simg,
        );
        return (
    $fc_array);

    Geändert von Uranjitsu (08.04.2017 um 20:40 Uhr)
    LG - Uranjitsu

Ähnliche Themen

  1. (PHP) - Mittels preg_match nach name und ähnlichen name suchen und als array ausgeben
    Von Uranjitsu im Forum Entwicklung / Programmierung
    Antworten: 2
    Letzter Beitrag: 30.10.2018, 18:33
  2. (Java) - Spielstand von RushHour (Array) in Datei speichern und auslesen
    Von Ikarus im Forum Entwicklung / Programmierung
    Antworten: 0
    Letzter Beitrag: 03.01.2016, 16:33

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  
SzeneBox.org... im Mittelpunkt der Szene!
© since 2015 szeneBOX.org - All Rights Reserved
Domains: www.szenebox.org