PHP Classes

File: ment.php

Recommend this page to a friend!
  Classes of Free Ment   PHP Live Chat Browser   ment.php   Download  
File: ment.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Live Chat Browser
Live chat with users of the same or another site
Author: By
Last change:
Date: 1 year ago
Size: 1,173 bytes
 

Contents

Class file image Download
<?php

//print('$_SERVER: ');var_dump($_SERVER);
//print('$_REQUEST: ');var_dump($_REQUEST);
//$data = get_by_request('data');
if(sizeof($_REQUEST) > 1) {
 
// a (satanic) computer is really dumb!
 
print('can\'t think about more than one thing at once! $_REQUEST: ');var_dump($_REQUEST);
  exit(
0);
} else {
  foreach(
$_REQUEST as $about => $about_value) { break; }
}

define(DS, DIRECTORY_SEPARATOR);
include(
'..' . DS . 'LOM' . DS . 'O.php');
if(!
file_exists('mind.xml')) {
 
file_put_contents('mind.xml', '');
}
$O = new O('mind.xml');

// always just search for now. how to choose what to search with..?
// https://schema.org/ could be interesting results if we let the AI try to dynamically determine the relevant scheme!
$action = 'search';
print(
$action . ':' . $about);

$O->new_('<thought><about>' . $about . '</about><time>' . microtime() . '</time><action>' . $action . '</action></thought>
'
); // don't really have to worry about the time format because if we are still using this in 2038 we have bigger problems ;p
$O->save();

function
get_by_request($variable) {
  return
$_REQUEST[$variable];
 
// what about data types when it's not in the request?
}

?>