Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Failed to load resource: the server responded with a status of 404 (Not Found)
http://martijn.tycal.org/chat/chat/room/update.php?_=1332374921720&state=-5&file=.png+.txt+.gif
<?php
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://martijn.tycal.org/chat/chat/room/chat.js") {
die();
}
?>
<?php
function getfile($f) {
if (file_exists($f)) {
$lines = file($f);
}
return $lines;
}
function getlines($fl){
return count($fl);
}
$state = htmlentities(strip_tags($_GET['state']), ENT_QUOTES);
$file = htmlentities(strip_tags($_GET['file']), ENT_QUOTES);
$finish = time() + 50;
$count = getlines(getfile($file));
while ($count <= $state) {
$now = time();
usleep(10000);
if ($now <= $finish) {
$count = getlines(getfile($file));
} else {
break;
}
}
if ($state == $count) {
$log['state'] = $state;
$log['t'] = "continue";
} else {
$text= array();
$log['state'] = $state + getlines(getfile($file)) - $state;
foreach (getfile($file) as $line_num => $line) {
if ($line_num >= $state) {
$text[] = $line = str_replace("\n", "", $line);
}
$log['text'] = $text;
}
}
echo json_encode($log);
?>
dat weet ik juist niet
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://martijn.tycal.org/chat/chat/room/chat.js") {
die();
}
//if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://martijn.tycal.org/chat/chat/room/chat.js") {
//die();
//}
dus van:
maken?PHP:if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://martijn.tycal.org/chat/chat/room/chat.js") { die(); } //if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://martijn.tycal.org/chat/chat/room/chat.js") { //die(); //}
<br />
<b>Warning</b>: fopen(.png .txt .gif) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home/is*public_html/martijn/chat/chat/room/process.php</b> on line <b>35</b><br />
<br />
<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/home/is**n/chat/chat/room/process.php</b> on line <b>35</b><br />
[]
<body><script type='text/javascript' language='javascript' src='/B1D671CF-E532-4481-99AA-19F420D90332/netdefender/hui/ndhui.js?0=0&0=0&0=0'></script>
<div id="page-wrap">
<div id="header">
<h1><a href="/examples/Chat2/">Chat </a></h1>
<div id="you"><span>ingelogt als:</span> tester</div>
</div>
<div id="section">
<h2>test</h2>
<div id="chat-wrap">
<div id="chat-area"></div>
</div>
<div id="userlist"></div>
>>>>>>>>>>>>>>>>>>>>> <form id="send-message-area" action="">//zie action is leeg
<textarea id="sendie" maxlength='100'></textarea>
</form>
</div>
</div>
</body>
<?php
session_start();
if (!isset($_SESSION['userid'])):
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chat</title>
<link rel="stylesheet" type="text/css" href="main.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2" type="text/javascript"></script> <!-- script not used-->
<script type="text/javascript" src="check.js"></script> <!-- script not used-->
</head>
<body>
<div id="page-wrap">
<div id="header">
</div>
<div id="section">
<form method="post" action="jumpin.php">
<label>gewenste gebruikersnaam*:</label>
<div>
<input type="text" id="userid" name="userid" />
<input type="submit" value="Check" id="jumpin" /><br />
doe a.u.b. tribalwars naam dan weet iedereen tegen wie ze praten.
</div>
</form>
</div>
<div id="status">
<?php if (isset($_GET['error'])): ?>
<!-- Display error when returning with error URL param? -->
<?php endif;?>
</div>
</div>
</body>
</html>
<?php
else:
require_once("chatrooms.php");
endif;
?>
<?php
session_start();
require_once("dbcon.php");
if (checkVar($_SESSION['userid'])):
$getRooms = "SELECT * FROM chat_rooms"; //[ERROR] no return at query
$roomResults = mysql_query($getRooms);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chat Rooms</title>
<link rel="stylesheet" type="text/css" href="main.css"/>
</head>
<body>
<div id="page-wrap">
<div id="header">
<?php //[ERROR] php old version
echo ("RUV-Re-United Visions") ?>
<div id="you"><span>ingelogt als:</span> <?php echo $_SESSION['userid']?></div>
</div>
<div id="section">
<div id="rooms">
<h3>Rooms</h3>
<ul>
<?php
while($rooms = mysql_fetch_array($roomResults)):
$room = $rooms['name'];
$query = mysql_query("SELECT * FROM `chat_users_rooms` WHERE `room` = '$room' ") or die("geen data gevonde". mysql_error());
$numOfUsers = mysql_num_rows($query);
?>
<li>
<a href="room/?name=<?php echo $rooms['name'].'">';//[ERROR] URLREWRITE NOT FOUND
echo $rooms['name'] . "<span>gebruikers chatten: <strong>" . $numOfUsers . "</strong></span>" ?>
</a>
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
</div>
</body>
</html>
<?php
else:
echo ("je bent niet inglogt");//[ERROR] ;
?>
klik <a href="index.php">hier</a>om in te loggen
<?php //[ERROR] php old version
endif;
?>
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.