Es posible usar la api de openload para esto?

  • Autor Autor krvaM
  • Fecha de inicio Fecha de inicio
krvaM

krvaM

Eta
Verificación en dos pasos activada
Hola, queria saber por que vi que openload ofrece unas api, pero no se si funcionara para esto.

Que cuando un usuario entre a mi pagina de videos, pueda subir un video y se suba mediante la api a openload?

API
:encouragement:
 
Si, se puede usar la api para subir, yo la uso para subir videos xxx de muchas paginas grandes con solo poner el link. PERO YO SOLO LO HAGO SUBIENDO COMO REMOTE UPLOAD
 
Yo creería que si, pero agrego a favoritos por si alguien con experiencia sabe :encouragement:
 
Si, se puede usar la api para subir, yo la uso para subir videos xxx de muchas paginas grandes con solo poner el link. PERO YO SOLO LO HAGO SUBIENDO COMO REMOTE UPLOAD

Podrias explicarme un poco mas? :encouragement:
 
Acabo de probar con la forma remota y bien, ya seria programar para que en un form se coloque el link y ya teniendo tu api login y key, se subira a tu cuenta directamente
 
Acabo de probar con la forma remota y bien, ya seria programar para que en un form se coloque el link y ya teniendo tu api login y key, se subira a tu cuenta directamente

Buenisimo, si puedes poner el codigo de como quedaria para ponerlo en mi web :encouragement:

- - - Actualizado - - -

Ayuda!! Alguien que sepa? Necesito hacerlo
 
[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:
 
[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:

Gracias!!
Lo probare y te dire q tal :encouragement: te debo unos $$ despues enviame tu paypal
 
Atrás
Arriba