Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Insert VOD from folder with php

Has anyone got this to work? I've been trying all day but it only produces errors
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
thank you shakacode
I'll prove, it was what I needed
 
<?php

// ShakaCode.net
// Agradecer no cuesta nada pero vale mucho
// Thank costs nothing

$servername = "xxx.xxx.xxx.xxx"; (ip of the server)
$username = "usuario"; (root for mysql)
$password = "clave"; (password of mysql)
$dbname = "xtream_iptvpro"; (database name)
$port = 7999; (port for mysql)
$ano =2018; (movie catogeroy)
$loco = 1; // Variable loco es el ID del servidor (server id 1)
// Ejemplo
// OVH = 2
// 4K = 18
// FON = 22
// CUMBIA = 24
// CHOTA = 26

$conn = new mysqli($servername, $username, $password, $dbname, $port);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$dir = "/home/vod/vod2018/"; (made this directory on server 1 with MereSai516.mp4 in the directory)

placed autovod.php file to /var/www/html/autovod/

in browser i run http://domainname/autovod/autovod.php

i do not get no output or no error message
when i check in mysql streams database there is nothing there
can you please help and advice how to run the script correctly

many thanks for your work
 
this is impossible to run on 2.9 the sql tables are different
maybe this is for 1.06?
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
i made some changes now the update works on 2.9
but will create two records without info

and it gives some error i think is because the script is trying to create a record with same value
im not expert with php anyone could help?

Error updating record: Duplicate entry '4021-1' for key



$conn = new mysqli($servername, $username, $password, $dbname, $port);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$dir = "/home/movies/";

if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($titulocompleto = readdir($dh)) !== false) {
// echo "Titulo Completo: $titulocompleto \n";
list($titulo) = explode('.elimino', $titulocompleto);
$titulo = preg_replace('/\./', ' ', $titulo);

$sql = "INSERT INTO `streams` (`id`, `type`, `category_id`, `stream_display_name`, `stream_source`, `stream_icon`, `notes`, `created_channel_location`, `enable_transcode`, `transcode_attributes`, `custom_ffmpeg`, `movie_propeties`, `movie_subtitles`, `read_native`, `target_container`, `stream_all`, `remove_subtitles`, `custom_sid`, `epg_id`, `channel_id`, `epg_lang`, `order`, `auto_restart`, `transcode_profile_id`, `pids_create_channel`, `cchannel_rsources`, `gen_timestamps`, `added`, `series_no`, `direct_source`, `tv_archive_duration`, `tv_archive_server_id`, `tv_archive_pid`, `movie_symlink`, `redirect_stream`, `rtmp_output`, `number`, `allow_record`, `probesize_ondemand`, `custom_map`, `external_push`, `delay_minutes`) VALUES(NULL, 2, 2, '$titulo', '[\"s:$loco:\\/home\\/vod\\/vod$ano\\/$titulocompleto\"]', '', '', NULL, 0, '[]', '', '{\"kinopoisk_url\":\"\",\"tmdb_id\":\"\",\"name\":\"teste\",\"o_name\":\"teste\",\"cover_big\":\"\",\"movie_image\":\"\",\"releasedate\":\"\",\"episode_run_time\":\"\",\"youtube_trailer\":\"\",\"director\":\"\",\"actors\":\"\",\"cast\":\"\",\"description\":\"\",\"plot\":\"\",\"age\":\"\",\"mpaa_rating\":\"\",\"rating_count_kinopoisk\":0,\"country\":\"\",\"genre\":\"\",\"backdrop_path\":[\"\"],\"duration_secs\":0,\"duration\":\"00:00:00\",\"video\":[],\"audio\":[],\"bitrate\":0,\"rating\":\"\"}', '[]', 1, '[\"mp4\"]', 0, 0, '', NULL, NULL, NULL, 0, '[]', 0, '', '', 1, 1572628798, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 128000, '', '[]', 0)";


if ($conn->query($sql) === TRUE) {
echo "Record updated successfully \n";
} else {
echo "Error updating record: " . $conn->error;
}

$sql = "SELECT * FROM streams WHERE stream_display_name = '{$titulo}'";
$resultado = $conn->query($sql);
if ($resultado = $resultado->fetch_array(MYSQLI_ASSOC)) {
$stream_id = $resultado['id'];
} else {
echo "Error updating record: " . $conn->error;
}

$sql = "INSERT INTO `streams_sys` (`server_stream_id`, `stream_id`, `server_id`, `parent_id`, `pid`, `to_analyze`, `stream_status`, `stream_started`, `stream_info`, `monitor_pid`, `current_source`, `bitrate`, `progress_info`, `on_demand`, `delay_pid`, `delay_available_at`) VALUES (NULL, $stream_id, 1, NULL, NULL, 0, 0, NULL, '', NULL, NULL, NULL, '', 1, NULL, 0)";




if ($conn->query($sql) === TRUE) {
echo "Record updated successfully \n";
} else {
echo "Error updating record: " . $conn->error;
}

}


}
}

$conn->close();
closedir($dh);

?>
 
thanks need some mods
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top