From 43c5c47a277ccbebb001da612e9139b836e78459 Mon Sep 17 00:00:00 2001 From: mika-nt28 Date: Wed, 8 Jun 2016 10:44:12 +0200 Subject: [PATCH] Add X-Plex-Token for all Request --- Machine/MachineAbstract.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Machine/MachineAbstract.php b/Machine/MachineAbstract.php index fca5c22..a35eebb 100644 --- a/Machine/MachineAbstract.php +++ b/Machine/MachineAbstract.php @@ -138,6 +138,11 @@ protected function xmlAttributesToArray($xml, $pass = 0) */ protected function makeCall($url) { + if(stripos($url,'?')>0) + $url.='&'; + else + $url.='?'; + $url.= 'X-Plex-Token='.$this->Token; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);