[MENTION=21765]krvaM[/MENTION] me tome el tiempo de crearte el script completo, espero que te sirva
😛8:
1) Creamos un archivo llamado
panel.php con el siguiente contenido:
PHP:
<?php
// CREADO POR Dieguit0sk8 - Forobeta.com
include ('config.php');
$archivo = $_POST['archivo'];
$openload = $_POST['openload'];
if($_POST['subir']) {
$apiremoteupload = file_get_contents('https://api.openload.co/1/remotedl/add?login='.$apiLogin.'&key='.$apiKey.'&url='.urlencode($archivo).'');
$uncompressed = json_decode($apiremoteupload);
$id= $uncompressed->result->id;
$resultado = '<iframe width="426" height="171" src="http://'.$folder.'/subiendo.php?id='.$id.'" scrolling="no" frameborder="0"></iframe>';
}
if(preg_match('/openload/i',$openload)) {
$resultado = '<h2>ARCHIVO SUBIDO CORRECTAMENTE</h2><b>LINK:</b> '.$openload.'';
}
?>
<html><head><title>API REMOTE UPLOAD OPENLOAD - PANEL</title></head><body><h1>API REMOTE UPLOAD OPENLOAD</h1><form action="" method="POST"><h3>Insertar link de archivo:</h3><input type="text" name="archivo" style="width:400px"><input type="submit" name="subir" id="subir" value="SUBIR"></form><?php echo $resultado; ?></br><p>Creado por Dieguit0sk8 - Forobeta.com</p></body></html>
2) Creamos un archivo llamado
subiendo.php con el siguiente contenido:
PHP:
<?php
// CREADO POR Dieguit0sk8 - Forobeta.com
include ('config.php');
$id = $_GET['id'];
$contenido = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SUBIENDOO.....</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script></head><body><script> $.getJSON("http://'.$folder.'/status.php?id='.$id.'",function(t){t.error?alert(t.msg):"finished"==t.status?($("body").append("<form></form>"),$("form").attr("action","http://'.$folder.'/panel.php").attr("method","post").attr("target","_top").append(\'<input name="openload" type="hidden" value="https://openload.co/f/\'+t.extid+\'/">\'),$("form").submit()):"downloading"==t.status?(document.getElementById("status").innerHTML="SUBIENDO...</br> TAMAÑO DE ARCHIVO: "+t.bytes_total+" </br> HASTA AHORA SUBIDO: "+t.bytes_loaded,window.location.reload()):document.getElementById("status").innerHTML="ERROR"}); </script><p id="status"></p></body></html>';
echo $contenido;
?>
3) Creamos un archivo llamado
status.php con el siguiente contenido:
PHP:
<?php
// CREADO POR Dieguit0sk8 - Forobeta.com
include ('config.php');
$id = $_GET['id'];
$apistatus = file_get_contents('https://api.openload.co/1/remotedl/status?login='.$apiLogin.'&key='.$apiKey.'&id='.$id.'');
$apistatus = str_replace('{"status":200,"msg":"OK","result":{"'.$id.'":', '', $apistatus);
$apistatus = str_replace("}}}", "}", $apistatus);
echo $apistatus;
?>
4) Y por ultimo creamos un archivo llamado
config.php con el siguiente contenido:
PHP:
<?php
// CREADO POR Dieguit0sk8 - Forobeta.com
$apiLogin = ''; //
$apiKey = '';
$folder = '';
?>
Para configurar el config.php solo tienes que agregar entre comillas el apiLogin y el apiKey, luego la variable $folder es donde se instala el script sin http:// y sin / al final, ejemplo: si el link del panel.php es:
http://tusitio.com/script/panel.php el folder es:
tusitio.com/script
Eso es todo amigo, disfrute el script
🙂 😛8: