Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Wyciąganie danych JSON przez PHP
xaitras
post 27.06.2017, 13:28:10
Post #1





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 27.06.2017

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


Witam wszystkich forumowiczów

Borykam się z problemem od dłuższego czasu. Może ktoś pomoże..

Do tej pory wykombinowałem takie coś:

  1.  
  2. $params = array (
  3.  
  4. 'token' => 'xxx-xxx-xxxx-xxxx',
  5. 'method' => 'getOrders',
  6. 'parameters' => '{ "status_id": 36310}'
  7.  
  8. );
  9.  
  10. $query = http_build_query ($params);
  11.  
  12. $contextData = array (
  13. 'method' => 'POST',
  14. 'header' => "Connection: close\r\n" .
  15. "Content-Length: ".strlen($query)."\r\n",
  16. 'content'=> $query );
  17.  
  18.  
  19. $context = stream_context_create (array ( 'http' => $contextData ));
  20.  
  21. $result = file_get_contents ('https://api.baselinker.com/connector.php', false, $context);
  22.  
  23.  
  24. $dane = json_decode($result);
  25.  
  26. $w = var_dump($dane);
  27.  
  28. echo $w;
  29.  


Próbuję wyciągnąć wszystkie numery zamówień z danego statusu ( api baselinker )
Problem w tym, że nie wiem jak wyciągnąć tylko numery.. facepalmxd.gifsad.gif
Wyświetla mi wszystkie dane zamówienia.



Pozdrawiam i czekam na pomoc sciana.gif
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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:18