Autor Tema:  ayuda con api  (Leído 1063 veces)

0 Usuarios y 1 Visitante están viendo este tema.

  • *
  • Mensajes: 67
  • Actividad:
    0%
  • Karma: 0
  • Puntos de Comercio
    0 (0%)
    • Awards
ayuda con api
« en: 06 de Noviembre de 2020, 12:03:53 am »
Como le hago para cargar los videos de esta api


<?php
$url = 'https://www.saveoffline.com/process/?url=https://openload.co/embed/'.$_GET['id'].'&type=json';
$get = file_get_contents($url);
$json = json_decode($get);
$video = $json->urls[0]->id;
?>

<?=$video?>

{"id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","title":"1x1.mp4","thumbnail":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","duration":null,"formats":[{"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}],"subtitles":{},"automatic_captions":{},"extractor":"GoogleDrive","webpage_url":"https:\/\/drive.google.com\/file\/d\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh\/view?usp=drivesdk","webpage_url_basename":"view","extractor_key":"GoogleDrive","playlist":null,"playlist_index":null,"thumbnails":[{"url":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","id":"0"}],"display_id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","requested_subtitles":null,"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}

  • *
  • Mensajes: 352
  • Actividad:
    0%
  • Karma: 62
  • Puntos de Comercio
    0 (0%)
  • Slice Of Life
    • Sutorimu Streaming Online
    • Awards
Re:ayuda con api
« Respuesta #1 en: 06 de Noviembre de 2020, 03:16:08 am »
Como le hago para cargar los videos de esta api


<?php
$url = 'https://www.saveoffline.com/process/?url=https://openload.co/embed/'.$_GET['id'].'&type=json';
$get = file_get_contents($url);
$json = json_decode($get);
$video = $json->urls[0]->id;
?>

<?=$video?>

{"id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","title":"1x1.mp4","thumbnail":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","duration":null,"formats":[{"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}],"subtitles":{},"automatic_captions":{},"extractor":"GoogleDrive","webpage_url":"https:\/\/drive.google.com\/file\/d\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh\/view?usp=drivesdk","webpage_url_basename":"view","extractor_key":"GoogleDrive","playlist":null,"playlist_index":null,"thumbnails":[{"url":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","id":"0"}],"display_id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","requested_subtitles":null,"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}

dices para sacar los enlace y colocarlo en un player propio en tu pagina ?
« última modificación: 06 de Noviembre de 2020, 03:17:16 am por Јхансито »

  • *
  • Mensajes: 1905
  • Actividad:
    0%
  • Karma: 114
  • Puntos de Comercio
    0 (0%)
  • Awards Gracias por tus aportes en scripts PHP ¡Gracias por todos tus aportes!
    • Awards
Re:ayuda con api
« Respuesta #2 en: 06 de Noviembre de 2020, 10:09:42 am »
Como le hago para cargar los videos de esta api


<?php
$url = 'https://www.saveoffline.com/process/?url=https://openload.co/embed/'.$_GET['id'].'&type=json';
$get = file_get_contents($url);
$json = json_decode($get);
$video = $json->urls[0]->id;
?>

<?=$video?>

{"id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","title":"1x1.mp4","thumbnail":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","duration":null,"formats":[{"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}],"subtitles":{},"automatic_captions":{},"extractor":"GoogleDrive","webpage_url":"https:\/\/drive.google.com\/file\/d\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh\/view?usp=drivesdk","webpage_url_basename":"view","extractor_key":"GoogleDrive","playlist":null,"playlist_index":null,"thumbnails":[{"url":"https:\/\/lh5.googleusercontent.com\/hc74LWymjMJIArLf4BvuVssMtlSY6C_W24JK0DAL_MK_ARqss9KtqZFWmZEJ9hk=w1200-h630-p","id":"0"}],"display_id":"1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh","requested_subtitles":null,"url":"https:\/\/doc-0c-54-docs.googleusercontent.com\/docs\/securesc\/ig1qshmtmfeif7s5lukpg3p38q8fh5rp\/62cak297n0fi7ub9d7jcdhc5indgjlho\/1604624475000\/16634483588023379981\/00438003169500964123Z\/1xUSQ6CqveYBleX3SJbbM-At-9OlQgpzh?e=download&nonce=2c8tna3865r80&user=00438003169500964123Z&hash=e7962oim5hfqob77pevb90of3mobpvh6","ext":"mp4","format_id":"source","quality":1,"format":"source - unknown","protocol":"https","http_headers":{"User-Agent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.11 Safari\/537.36","Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Encoding":"gzip, deflate","Accept-Language":"en-us,en;q=0.5","Cookie":"AUTH_jshtbmoripfkhbdq448nof2db22uq458=00438003169500964123Z|1604624475000|9ljfhn0ja71g3jq509iba31v1dj2cr8f"}}

Pues en primer lugar debes aprender a consumir servicios web en json, ahí tienes todo de loque veo a simple vista, solo debes consumirlo y ponerlo dentro del reproductor y ya. Si estas preguntando como exactamente hacer eso, entonces lo primero que vas a tener que hacer es aprender a programar... eso o pagarle a alguien para que lo haga por ti.

If debugging is the process of removing bugs, then programming must be the process of putting them in

  • Nooby.Dev
  • *
  • Mensajes: 42
  • Actividad:
    0%
  • Karma: 0
  • Puntos de Comercio
    0 (0%)
  • Nooby.Dev
    • Awards
Re:ayuda con api
« Respuesta #3 en: 06 de Noviembre de 2020, 02:10:55 pm »
No pude probar el script porque no me carga la url, pero si quieres obtener el enlace directo del video segun tu ejemplo
cambia
<?=$video?>
por
<?php echo $video->url; ?>

 

Temas Similares

  Asunto / Iniciado por Respuestas Último mensaje
6 Respuestas
1773 Vistas
Último mensaje 17 de Diciembre de 2012, 04:34:54 pm
por soyank
12 Respuestas
2836 Vistas
Último mensaje 01 de Enero de 2013, 10:52:11 pm
por NewShare
6 Respuestas
2106 Vistas
Último mensaje 23 de Enero de 2013, 03:14:58 pm
por Clcp92
11 Respuestas
1100 Vistas
Último mensaje 08 de Julio de 2013, 06:12:51 am
por Rafii Dj
4 Respuestas
1695 Vistas
Último mensaje 13 de Mayo de 2015, 04:08:50 pm
por Janlysp