25 lines
516 B
PHP
25 lines
516 B
PHP
<?php
|
|
$servername = "192.168.0.177";
|
|
$username = "myuser";
|
|
$password = "1qayxsw2";
|
|
|
|
// Create connection
|
|
$conn = new mysqli($servername, $username, $password);
|
|
|
|
// Check connection
|
|
|
|
|
|
if (isset($_POST['action'])) {
|
|
$action = $_POST['action'];
|
|
switch ($action) {
|
|
case "getMovies":
|
|
echo('{"data":[{"url":"./vid.mp4"}]}');
|
|
break;
|
|
}
|
|
} else {
|
|
if ($conn->connect_error) {
|
|
echo('{"data":"error"}');
|
|
// die("Connection failed: " . $conn->connect_error);
|
|
}
|
|
}
|