Das denke ich mir.
Bisher habe ich das so gelöst, einwandfrei.
$sldl = str_replace(SHARELINKZBIZ_FOLDERKEY, '', $image_download_url);
if ($image_download_url == SHARELINKZBIZ_FOLDERKEY . $sldl . '') {
$sl_curl = curl_init();
curl_setopt($sl_curl, CURLOPT_URL, SHARELINKZBIZ);
curl_setopt($sl_curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($sl_curl, CURLOPT_POST, 1);
curl_setopt($sl_curl, CURLOPT_FOLLOWLOCATION, 1);
$array = array(
'apikey' => 'xxx',
'folderCode' => $sldl
);
curl_setopt($sl_curl, CURLOPT_POSTFIELDS, $array);
$sl_echo = explode(';', curl_exec($sl_curl));
curl_close($sl_curl);
if ($config['container_name'] == 0) {
$image_filesize = byte_umrechner($sl_echo[2]);
$image_provider = $sl_echo[3];
} else {
$sls_curl = curl_init();
curl_setopt($sls_curl, CURLOPT_URL, SHARELINKZBIZ_STATS);
curl_setopt($sls_curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($sls_curl, CURLOPT_POST, 1);
curl_setopt($sls_curl, CURLOPT_FOLLOWLOCATION, 1);
$arrays = array(
'apikey' => 'xxx',
'folderCodes' => $sldl
);
curl_setopt($sls_curl, CURLOPT_POSTFIELDS, $arrays);
$sls_echo = explode(';', curl_exec($sls_curl));
curl_close($sls_curl);
$image_name = $sls_echo[1];
$image_filesize = byte_umrechner($sl_echo[2]);
$image_provider = $sl_echo[3];
}
}
$ncdl = str_replace(NCRYPTIN_FOLDERKEY, '', $image_download_url);
if ($image_download_url == NCRYPTIN_FOLDERKEY . $ncdl . '') {
$nc_curl = curl_init();
curl_setopt($nc_curl, CURLOPT_URL, NCRYPTIN);
curl_setopt($nc_curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($nc_curl, CURLOPT_POST, 1);
curl_setopt($nc_curl, CURLOPT_FOLLOWLOCATION, 1);
$array = array(
'link' => NCRYPTIN_FOLDERKEY . $ncdl
);
curl_setopt($nc_curl, CURLOPT_POSTFIELDS, $array);
$nc_echo = explode(';', curl_exec($nc_curl));
curl_close($nc_curl);
if ($config['container_name'] == 0) {
$image_filesize = byte_umrechner($nc_echo[2]);
$image_provider = $nc_echo[1];
} else {
$image_filesize = byte_umrechner($nc_echo[2]);
$image_provider = $nc_echo[1];
$image_name = $nc_echo[4];
}
}
$lcdl = str_replace(LINKCRYPTWS_FOLDERKEY, '', $image_download_url);
if ($image_download_url == LINKCRYPTWS_FOLDERKEY . $lcdl . '') {
$returnData = file_get_contents(LINKCRYPTWS . $lcdl);
if (!$returnData or !$returnData = @simplexml_load_string($returnData)) {
echo "Keine Daten empfangen!";
} else {
$image_filesize = $returnData->folderSize . ' MB';
$image_provider = $returnData->folderHoster;
if ($config['container_name'] == 1) {
}
$image_name = $image_name;
}
}
Aber wie gesagt, deine Variante werde ich mir in jedem Fall anschauen.
Um selber dein Script zu testen, brauchst du im Grunde keine Zugangsdaten.
Bis auf Share-Linkz, ist die Abfrage der Daten ohne APIKey möglich.
Für Share-Linkz kann ich dir einen zum testen geben.
Für die anderen, reicht lediglich ein Ordnerlink.