Login system / or some kind of anonymous commenting ( to add links )
Has it's own webpages for me to edit
Has a 'link' page that is able to take links with name, url, description.
I can't find any after googling :huh:/>
000webhost is great, as long as you have HTML and/or PHP knowledge
Hmmm, okay, I'll check it out later when I'm at home.
Does it allow registration/login or not? Can people (anyone) post things (links/pictures) onto the website?
yea, you have to use PHP and the HTTP api
<?php
//Who wants to bet this won't highlight correctly?
mysql_connect("localhost", "YOURMYSQLUSERNAME", "YOURMYSQLPASSWORD");
$query = mysql_query("SELECT * FROM YOURTABLEHERE");
echo json_encode(mysql_fetch_assoc($query));
//Really, you should be using PDO and perpared statements. I'm not typing that out, and I doubt 000WH has support for it.
?>
--You will need a pure-Lua JSON decoder. There are a few of these floating around.
print("Now fetching data from website")
result = http.get("LINKTOYOURPHPSCRIPT").readAll()
if result ~= "" then
results = json.decode(result)
else
print("Unable to fetch data from website")
end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title>Database Info</title>
</head>
<body>
<h2>Information in the database</h2>
<?php
// Connects to your Database
mysql_connect("xxxx", "xxxx", "xxxx") or die(mysql_error());
mysql_select_db("xxxx") or die(mysql_error());
$data = mysql_query("SELECT * FROM xxxx") or die(mysql_error());
Print "\n<!-- Start of Table -->\n";
Print "<table border=1 cellpadding=15>\n";
Print "\n<!-- First row (Headings) -->\n";
Print "<tr>\n";
Print " <th>ID</th>\n";
Print " <th>User</th>\n";
Print " <th>Title</th>\n";
Print " <th>URL</th>\n";
Print " <th>Description</th> \n";
Print " <th>Post Date</th> \n";
Print "</tr> \n";
while($info = mysql_fetch_array( $data ))
{
Print "<!-- ID NO. <ID>".$info['id']."</ID> -->\n";
Print "<!-- USER <USER>".$info['user']."</USER> -->\n";
Print "<!-- VIDEO_TITLE <TITLE>".$info['video_name']."</TITLE> -->\n";
Print "<!-- VIDEO_URL <URL>".$info['video_url']."</URL> -->\n";
Print "<!-- VIDEO_DESCRIPTION <DESC>".$info['video_desc']."</DESC> -->\n";
Print "<!-- VIDEO_TIMESTAMP <POSTDATE>".$info['video_timestamp']."</POSTDATE> -->\n";
Print "<tr>\n";
Print " <td>".$info['id']."</td>\n";
Print " <td>".$info['user']."</td>\n";
Print " <td>".$info['video_name']."</td>\n";
Print " <td>".$info['video_url']."</td>\n";
Print " <td>".$info['video_desc']."</td>\n";
Print " <td>".$info['video_timestamp']."</td>\n";
Print "</tr>\n";
}
Print "<!-- End of Table -->\n";
Print "</table>\n";
?>
</body>
</html>