<?php
// URL del archivo a descargar
$file_url = 'https://c...content-available-to-author-only...a.cu/pluginfile.php/1/theme_enlightlite/logo/1679431194/logotipo-etecsa-version-horizontal-%20copia.png';
$file_path = 'hqdefault.png';
// Descargar el archivo
if ($http_code == 200) {
} else {
echo 'Error al descargar el archivo: ' . $http_code;
}
// URL del servidor de destino
$target_url = 'https://c...content-available-to-author-only...a.cu/repository/repository_ajax.php?action=upload';
'repo_upload_file' => new CURLFile($file_path, 'image/jpeg', 'hqdefault.png'),
'title' => 'hq.jpg',
'author' => 'Francisco Gómez',
'license' => 'allrightsreserved',
'itemid' => '375367234',
'repo_id' => '4',
'p' => '',
'page' => '',
'env' => 'filemanager',
'sesskey' => 'REBmRIYCgF',
'client_id' => '66eacb76e9c9e',
'maxbytes' => '67108864',
'areamaxbytes' => '104857600',
'ctx_id' => '4146',
'savepath' => '/'
);
if ($response === false) {
} else {
echo $response;
}
?>
PD9waHAKCgovLyBVUkwgZGVsIGFyY2hpdm8gYSBkZXNjYXJnYXIKJGZpbGVfdXJsID0gJ2h0dHBzOi8vYy4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4uYS5jdS9wbHVnaW5maWxlLnBocC8xL3RoZW1lX2VubGlnaHRsaXRlL2xvZ28vMTY3OTQzMTE5NC9sb2dvdGlwby1ldGVjc2EtdmVyc2lvbi1ob3Jpem9udGFsLSUyMGNvcGlhLnBuZyc7CiRmaWxlX3BhdGggPSAnaHFkZWZhdWx0LnBuZyc7CgovLyBEZXNjYXJnYXIgZWwgYXJjaGl2bwokY2ggPSBjdXJsX2luaXQoJGZpbGVfdXJsKTsKY3VybF9zZXRvcHQoJGNoLCBDVVJMT1BUX1JFVFVSTlRSQU5TRkVSLCB0cnVlKTsKJHJlc3BvbnNlID0gY3VybF9leGVjKCRjaCk7CiRodHRwX2NvZGUgPSBjdXJsX2dldGluZm8oJGNoLCBDVVJMSU5GT19IVFRQX0NPREUpOwpjdXJsX2Nsb3NlKCRja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