forked from lanceseidman/PiCAST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goCAST.php
55 lines (44 loc) · 1.16 KB
/
goCAST.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// INSERT ITEMS IN TO PiCAST DB
// CONNECT TO YOUR DB
$res = mysql_connect("localhost","piCASTER","piCAST1337");
// CONNECT SELECT THE DB
mysql_select_db("picasts", $res);
// DOES THE WEBSITE TAG EXIST?
if($_GET["website"])
{
// IT EXISTS! LET'S STORE IT FOR OUR DATABASE QUERY
// - WE'LL USE MIDORI AS FULLSCREEN BROWSER...
$website = "midori -e Fullscreen -a ".$_GET["website"];
//Debug: echo 'Found Website, going to process it!";
}
if($_GET["youtube"])
{
$youtube = $_GET["youtube"];
//Debug: echo "Found YT Video!";
}
if($_GET["image"])
{
$image = $_GET["image"];
//Debug: echo "Found Image!";
}
if($_GET["map"])
{
$map = $_GET["map"];
//Debug: echo "Found Map!";
}
if($_GET["music"])
{
$music = $_GET["music"];
//Debug: echo "Found Music!";
}
/* MAKE SURE ONLY 1 TASK IS RECEIVED!
if($image . $map . $music)
** CODE TO BE FINISHED IN NEXT VERSION! */
// CREATE SQL QUERY FOR DATABASE
$query = "INSERT INTO `vsweb_picast`.`Items` (`ID`, `website`, `image`, `map`, `youtube`) VALUES (NULL, '$website', '$image', '$map', '$youtube');";
$which = $res;
// PERFORM THE INSERT IN TO PiCAST DATABASE
$sth = mysql_query($query,$which);
mysql_close($res);
?>