$prefix="http://"; $at="@"; $path = '/ISAPI/ContentMgmt/search'; // Suchbefehl $path2 = '/ISAPI/ContentMgmt/download'; // Downloadbefehl für Kamera $videoname= GetValueString(10479); // test********************************************************** $composedUrl=$prefix.$user.$colon.$pass.$at.$host.$colon.$port.$path2; CurlOperation($composedUrl,$videoname,$xml_data1,$downloadrequest); function CurlOperation($curlUrl,&$videoname,&$xml_data1,&$downloadrequest) //function CurlOperation($curlUrl,&$xml_data,&$suchbefehl) { $result= ""; $curlOptions = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET' ); $ch = curl_init($curlUrl); curl_setopt_array($ch, $curlOptions); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $downloadrequest); $xml_data=curl_exec($ch); file_put_contents ($videoname,$xml_data1); return $xml_data1; curl_close($ch); }