Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Computer programmers do it byte by byte.


devel / comp.lang.php / Re: Interacting rooms internet page............

SubjectAuthor
* Interacting rooms internet page............We
`* Re: Interacting rooms internet page............J.O. Aho
 `* Re: Interacting rooms internet page............Angel
  `* Re: Interacting rooms internet page............J.O. Aho
   `* Re: Interacting rooms internet page............Angel
    `* Re: Interacting rooms internet page............J.O. Aho
     `* Re: Interacting rooms internet page............Whe
      `- Re: Interacting rooms internet page............J.O. Aho

1
Interacting rooms internet page............

<11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=390&group=comp.lang.php#390

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:ad4:594a:: with SMTP id eo10mr5080227qvb.34.1637745342343;
Wed, 24 Nov 2021 01:15:42 -0800 (PST)
X-Received: by 2002:a25:32c9:: with SMTP id y192mr13553745yby.443.1637745342034;
Wed, 24 Nov 2021 01:15:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Wed, 24 Nov 2021 01:15:41 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=193.40.120.146; posting-account=s3OxiwkAAABE2kqiXXKi7ZVC4Hsq_zQz
NNTP-Posting-Host: 193.40.120.146
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
Subject: Interacting rooms internet page............
From: ya12983@mail.com (We)
Injection-Date: Wed, 24 Nov 2021 09:15:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 1536
 by: We - Wed, 24 Nov 2021 09:15 UTC

ilist.php

<?php

include("../data.php");

class Msg extends Dobj{
var $text;
}

class Inimene extends Dobj{
var $name;
var $time;
var $dpic;
}

$myd=new Data();

$myd->loadobjecttables();
$texists=false;
$t1=$myd->dtables;

$ilist=array();

$itidx=-1;
for($i=0; $i<count($t1);$i++) {
if($t1[$i][0]->getNameOfClass()=="Inimene") {
$texists=true;
$itidx=$i;
break;
} }

$newi=array();

if($itidx>-1) {
for($i=0; $i<count($t1[$itidx]);$i++) {
$date12=date("d.m.Y H:i:s", strtotime($t1[$itidx][$i]->time));
$dtime = new DateTime($date12);

$datenow=date( 'd.m.Y H:i:s', strtotime( '+3 hour' , strtotime("now") ));
$dtimenow = new DateTime($datenow);

$diff = $dtimenow->getTimestamp() - $dtime->getTimestamp();
if($diff<60*15) {
$newi[]=$t1[$itidx][$i];
} else {
} }
if(count($newi)==0) {
unset($t1[$itidx]);
unlink("Inimene.dat");
} else {
$t1[$itidx]=$newi;
$myd->dtables=$t1;
$myd->saveobjecttable("Inimene");
} }

if($texists==true) {
$t2=$myd->query("get name from Inimene;");
for($i=0; $i<count($t2);$i++) {
$ilist[]=$t2[$i];
} } else {

}

$result = array_unique($ilist);
$List = implode(', ', $result);
if(substr($List,strlen($List)-2, 2)==", ") {
$List=substr($List, 0, strlen($List)-2);
} echo $List;

?>
index.php

<!DOCTYPE html>
<html>
<head>
<link rel="icon" style="width:15px; height=15px; background-color: #76FEFF; color: #76FEFF;"/>

<style>
input {
color: #76FEFF;
}

body {
/*
background-image: url("img.jpg");

background-repeat: repeat;
background-size: 100%;
*/

background-color: #76FEFF;

}

..main12 {
text-decoration:none;
color: #76FEFF;
font-weight: bold;
background-color: white;
border: 1px solid white;
border-radius: 10px 10px;
padding: 5px;
font-weight:bold;
} ..main1 {
text-decoration:none;
color: white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:775px;
}

..main12 {
text-decoration:none;
color: #76FEFF;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
vertical-align: middle;
width:535px;
}

..main2 {
color: white;
}

..main3 {
text-decoration:none;
color: #76FEFF;
font-weight: bold;
background-color: white;
border: 1px solid white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:100px;
display:block;

}

..w1 {
color: white;
} ..w2 {
color: white;
display:inline-block;
} ..pwd {
color: #76FEFF;
display:inline-block;
}

..w21 {
color: white;
display:block;
}

</style>
</head>
<body>
<h1 class="main1">
</h1>
<h1 class="main12" style="line-height: 45px;">W e l c o m e . T e r e t u l e m a s t .</h1>
<h1 class="main1">
</h1>

<?php

include("func.php");
include("data.php");

class Password extends Dobj{
var $content;
}

$dirs = array_filter(glob('*'), 'is_dir');

$cannotcreate=false;

if(count($dirs)>60) {
$cannotcreate=true;
}

if(!empty($_POST['rname'])&&($_POST['rname']!=" ")&&!empty($_POST['rname'])&$cannotcreate==false) {
$_POST['rname'] = strip_tags($_POST['rname']);
$_POST['rname']=substr($_POST['rname'],0, 100);
$_POST['rname'] = str_replace(' ', 'space21326', $_POST['rname']);
$_POST['rname'] = str_replace(',', 'comma21326', $_POST['rname']);
$_POST['rname'] = str_replace('?', 'q21326', $_POST['rname']);
$_POST['rname'] = str_replace('\'', 'ukom21326', $_POST['rname']);
mkdir($_POST['rname'], 0755);

if(!empty($_POST['password'])&&$_POST['password']!="") {
$myd=new Data();
$tabls=array();
$pwd1=new Password();
$pwd1->content=$_POST['password'];
$pwdt=array();
$pwdt[]=$pwd1;
$tabls[]=$pwdt;
$myd->dtables=$tabls;
$myd->saveobjecttable("Password");

$file = 'Password.dat';
$newfile = 'Password.dat';
if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
} chmod($_POST['rname'].'/'.$newfile, 0700);

unlink("Password.dat");
}

$file = 'index2.php';
$newfile = 'index.php';
if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
} chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'renewing.php';
$newfile = 'renewing.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'ilist.php';
$newfile = 'ilist.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'findlastmdate.php';
$newfile = 'findlastmdate.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'func.php';
$newfile = 'func.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

}

$dirs = array_filter(glob('*'), 'is_dir');

if(count($dirs)>0) {
echo "<h2 class='main2'>Topics</h2>";
}

$dirs = array_filter(glob('*'), 'is_dir');

foreach ($dirs as $file) {
$file2= str_replace('space21326', '&nbsp;', $file);
$file2= str_replace('comma21326', ',', $file2);
$file2= str_replace('q21326', '?', $file2);
$file2= str_replace('ukom21326', '\'', $file2);
if($file=="files") continue;

$dir1='//'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$output = file_get_contents('http:'.$dir1.$file.'/findlastmdate.php');
if($output!="") {
$date12=date("d.m.Y H:i:s", strtotime($output));
$d_start = new DateTime($date12);
$currentdate = date('d.m.Y H:i:s', time());
$d_end = new DateTime($currentdate);
$diff = $d_start->diff($d_end);
$delete1=false;
if(!($diff->format('%d')<1000||$diff->format('%d')==1000&&$diff->format('%h')<1))
$delete1=true;
if($delete1) {
rrmdir('/'.$file);
continue;
} }
echo '<a class="main12" href=\'http:'.$dir1.$file.'\'>'.$file2.'</a>';
echo "<p></p>";
$path_parts = pathinfo($file.'/Msg.dat');
if(!class_exists($path_parts['filename'])) {
continue;
} }

?>
<p style="height:50px;"> </p>

<form method="POST">
<p class="w2">
Topic:
</p>
<input name="rname"/>
<p class="w21">
Password(optional)
</p>
<input class="pwd" name="password" type="password"/>
<p class="w">
</p>
<input type="submit" class="main3" value="Create"/>
</form>
<p class="w1" style="color: #j3k4f8; font-weight: bold;">
To access password protected topic: /index.php?code=Password</p>
<p class="w1" style="color: #j3k4f8; font-weight: bold;">Attention: Please try to behave, while in talkrooms.....</p>
<p></p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p class="w1"></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

</body>
</html>
index2.php

<!DOCTYPE html>
<html>
<head>
<link rel="icon" style="width:15px; height=15px; background-color: #76FEFF; color: #76FEFF;"/>

<style>
input {
color: #76FEFF;
}

body {
background-color: #76FEFF;
}

..file1 {
text-decoration: none;
color: #76FEFF;
}

..main1 {
text-decoration:none;
color: #76FEFF;
background-color: white;
border: 1px solid white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:100px;
}


Click here to read the complete article
Re: Interacting rooms internet page............

<j06f32F1adnU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=391&group=comp.lang.php#391

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: comp.lang.php
Subject: Re: Interacting rooms internet page............
Date: Wed, 24 Nov 2021 10:31:14 +0100
Lines: 6
Message-ID: <j06f32F1adnU1@mid.individual.net>
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ytH4cqkFuC9YH/pwJ+xDeQODu402WqxwBcPl8z8q/sha4DwELa
Cancel-Lock: sha1:64X2hqebPVhGwMtpSbOWZVC6dLQ=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Content-Language: en-US-large
In-Reply-To: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
 by: J.O. Aho - Wed, 24 Nov 2021 09:31 UTC

On 24/11/2021 10.15, We wrote:
> ilist.php

Use a git repository for your files, do not post them here, and please
stop spamming the usergroups with your trash messages.

Re: Interacting rooms internet page............

<7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=567&group=comp.lang.php#567

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a5d:4e12:0:b0:21b:ae89:73e7 with SMTP id p18-20020a5d4e12000000b0021bae8973e7mr4038127wrt.386.1656521901814;
Wed, 29 Jun 2022 09:58:21 -0700 (PDT)
X-Received: by 2002:a81:8004:0:b0:318:7e2d:5bd5 with SMTP id
q4-20020a818004000000b003187e2d5bd5mr4870950ywf.211.1656521901234; Wed, 29
Jun 2022 09:58:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Wed, 29 Jun 2022 09:58:21 -0700 (PDT)
In-Reply-To: <j06f32F1adnU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=85.253.192.76; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 85.253.192.76
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com> <j06f32F1adnU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
Subject: Re: Interacting rooms internet page............
From: he12091983@gmail.com (Angel)
Injection-Date: Wed, 29 Jun 2022 16:58:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Angel - Wed, 29 Jun 2022 16:58 UTC

J.O. Aho kirjutas Kolmapäev, 24. november 2021 kl 11:31:23 UTC+2:
> On 24/11/2021 10.15, We wrote:
> > ilist.php
>
> Use a git repository for your files, do not post them here, and please
> stop spamming the usergroups with your trash messages.

Hey JO Aho

Have You looked carefully the code ?
What do You think of the small database file data.php ?
I guess You and many others too could use it to make faster apps.

data.php:

<?php

class Dobj {
function getNameOfClass()
{ return static::class;
} }

class Data {

var $dtables;

function gettime() {
return date("d.m.Y H:i:s");
}

function loadobjecttables() {
$dtables = array();
foreach (glob("*.dat") as $file) {
$path_parts = pathinfo($file);
if(!class_exists($path_parts['filename'])) {
continue;
} $file1 = file_get_contents($file, true);
$dtables[] = unserialize($file1);
} $this->dtables=$dtables;
}

function deleteotable($otabname) {
if (file_exists($otabname.".dat")) {
unlink($otabname.".dat");
} $this->loadobjecttables();
}

function insertobject($obj) {
$this->loadobjecttables();
$oclass=$obj->getNameOfClass();
$tabls=$this->dtables;
$oarridx=-1;
for($i=0; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$oclass) {
$oarridx=$i;
} }
if($oarridx==-1) return false;
$tabls[$oarridx][]=$obj;
unlink($oclass.".dat");
$b=serialize($tabls[$oarridx]);
$fh = fopen($oclass.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($oclass.".dat", 0700);
}

function saveobjecttables() {
$tabls=$this->dtables;
for($i=0; $i<count($tabls); $i++) {
$oc=$tabls[$i][0]->getNameOfClass();
if (file_exists($oc.".dat")) {
unlink($oc.".dat");
} $b=serialize($tabls[$i]);
$fh = fopen($oc.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($oc.".dat", 0700);
} return true;
}

function saveobjecttable($objcl) {
$tabls=$this->dtables;
$obclindex=-1;
for($i=0; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$objcl) {
$obclindex=$i;
break;
} }
if (file_exists($objcl.".dat")) {
unlink($objcl.".dat");
} $b=serialize($tabls[$obclindex]);
$fh = fopen($objcl.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($objcl.".dat", 0700);
return true;
}

function makearrayunique($array){
$duplicate_keys = array();
$tmp = array();

foreach ($array as $key => $val){
if (is_object($val))
$val = (array)$val;

if (!in_array($val, $tmp))
$tmp[] = $val;
else $duplicate_keys[] = $key;
}

foreach ($duplicate_keys as $key)
unset($array[$key]);
return $array;
}

function deleteduplicates() {
$ob=$this->dtables;
for($i=0; $i<count($ob); $i++) {
$o12=$this->makearrayunique($ob[$i]);
$ob[$i]=$o12;
} $this->saveobjecttables();
}

function deleteduplicatescl($objcl) {
$ob=$this->dtables;
$obclindex=-1;
for($i=0; $i<count($ob); $i++) {
if($ob[$i][0]->getNameOfClass()==$objcl) {
$obclindex=$i;
break;
} }
$o12=$this->makearrayunique($ob[$obclindex]);
$ob[$obclindex]=$o12;
$this->dtables=$ob;
$this->saveobjecttable($objcl);
}

function objectClassestoarray($objectA,
$objectB) {
$new_object = array();

foreach($objectA as $property => $value) {
$new_object[$property]=$value;
}

foreach($objectB as $property => $value) {
$new_object[$property]=$value;
}

return $new_object;
}

function query($query) {
$this->loadobjecttables();
$ovars=array();
$objects=$this->dtables;
for($i=0; $i<count($objects); $i++) {
$ovars[]=array_keys(get_object_vars($objects[$i][0]));
} $mches=array();
$results=null;
$exitf=false;

for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass().";$/",$query)) {
$objectsList = [];
foreach ($objects[$i] as $obj) {
$objectsList[] = (array)$obj;
} return $objectsList;
$exitf=true;
} }
}

for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(preg_match("/^get ".$ovars[$i][$j]." from ".$objects[$i][0]->getNameOfClass().";$/",$query)) {
return array_column($objects[$i], $ovars[$i][$j]);
$exitf=true;
} }
}

$outp=array();
for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars[$i]); $j++) {
if($exitf) break;
for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(!class_exists($objects[$k][0]->getNameOfClass())) continue;

if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass()." join ".$objects[$k][0]->getNameOfClass().
" on \(".$objects[$i][0]->getNameOfClass()."\.".$ovars[$i][$j]."\=".$objects[$k][0]->getNameOfClass().
"\.".$ovars[$k][$l]."\);$/",$query)) {
for($ii=0; $ii<count($objects[$i]); $ii++) {
for($ii2=0; $ii2<count($objects[$k]);$ii2++) {
if($objects[$i][$ii]->{$ovars[$i][$j]}==$objects[$k][$ii2]->{$ovars[$k][$l]}) {
$oobj = $this->objectClassestoarray($objects[$i][$ii], $objects[$k][$ii2]);
$outp[]=$oobj;
} }
} $exitf=true;
} }
} }
}

for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
for($l2=0; $l2<count($ovars[$k]); $l2++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass()))
continue;

if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*) and ".$ovars[$k][$l2]."\=(.*);$/",$query, $matches)) {
for($ii2=0;
$ii2<count($objects[$k]); $ii2++) {

if($objects[$k][$ii2]->{$ovars[$k][$l]}==$matches[1]&&$objects[$k][$ii2]->{$ovars[$k][$l2]}==$matches[2]) {

$oobj = (array)$objects[$k][$ii2];

$outp[]=$oobj;
} }
$exitf=true;
} }
} }

for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass())) continue;
if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*);$/",$query, $matches)) {
for($ii2=0; $ii2<count($objects[$k]); $ii2++) {
if($objects[$k][$ii2]->{$ovars[$k][$l]}==$matches[1]) {
$oobj = (array)$objects[$k][$ii2];
$outp[]=$oobj;
} }
$exitf=true;
} }
}

if(count($outp)>0) {
return $outp;
}

return $mches;
}

}

?>

Re: Interacting rooms internet page............

<ji5b2qFc54rU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=577&group=comp.lang.php#577

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: comp.lang.php
Subject: Re: Interacting rooms internet page............
Date: Thu, 30 Jun 2022 12:09:30 +0200
Lines: 22
Message-ID: <ji5b2qFc54rU1@mid.individual.net>
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
<j06f32F1adnU1@mid.individual.net>
<7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net UfcuPKRFXiil4HcV0oJEeA07zHR/hZ4f3u4/wj5WMcAVtrJFUg
Cancel-Lock: sha1:1wdznaribO4lVEoL1CoYqMx0OKc=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-US-large
In-Reply-To: <7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
 by: J.O. Aho - Thu, 30 Jun 2022 10:09 UTC

On 29/06/2022 18.58, Angel wrote:
> J.O. Aho kirjutas Kolmapäev, 24. november 2021 kl 11:31:23 UTC+2:
>> On 24/11/2021 10.15, We wrote:
>>> ilist.php
>>
>> Use a git repository for your files, do not post them here, and please
>> stop spamming the usergroups with your trash messages.
>
> Have You looked carefully the code ?

Send the git repository link and maybe can think of looking at it, until
then Kristjan please stop behaving like Nazi-Russia.

> What do You think of the small database file data.php ?
> I guess You and many others too could use it to make faster apps.

PHP is slow and you database will suffer with increase number of data.

--
//Aho

Re: Interacting rooms internet page............

<9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=578&group=comp.lang.php#578

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a05:6000:1448:b0:21b:b7db:c40b with SMTP id v8-20020a056000144800b0021bb7dbc40bmr7926752wrx.279.1656586575628;
Thu, 30 Jun 2022 03:56:15 -0700 (PDT)
X-Received: by 2002:a05:6902:90e:b0:669:5bfb:9877 with SMTP id
bu14-20020a056902090e00b006695bfb9877mr8880800ybb.323.1656586575092; Thu, 30
Jun 2022 03:56:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Thu, 30 Jun 2022 03:56:14 -0700 (PDT)
In-Reply-To: <ji5b2qFc54rU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.38.193; posting-account=kVpizAoAAAAzVkZscNo9TMzyHVX_RyOV
NNTP-Posting-Host: 82.131.38.193
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
<j06f32F1adnU1@mid.individual.net> <7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
<ji5b2qFc54rU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>
Subject: Re: Interacting rooms internet page............
From: he1983912@gmail.com (Angel)
Injection-Date: Thu, 30 Jun 2022 10:56:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Angel - Thu, 30 Jun 2022 10:56 UTC

J.O. Aho kirjutas Neljapäev, 30. juuni 2022 kl 12:09:39 UTC+2:
> On 29/06/2022 18.58, Angel wrote:
> > J.O. Aho kirjutas Kolmapäev, 24. november 2021 kl 11:31:23 UTC+2:
> >> On 24/11/2021 10.15, We wrote:
> >>> ilist.php
> >>
> >> Use a git repository for your files, do not post them here, and please
> >> stop spamming the usergroups with your trash messages.
> >
> > Have You looked carefully the code ?
> Send the git repository link and maybe can think of looking at it, until
> then Kristjan please stop behaving like Nazi-Russia.

I have thought on putting things there, but I have found out, that it is better to put them here, because of the complexness of the procedures.

> > What do You think of the small database file data.php ?
> > I guess You and many others too could use it to make faster apps.
> PHP is slow and you database will suffer with increase number of data.

No, there will be no problems with it, because the data amounts do no matter, which should be actually clear to everyone. Only my DB system has not maybe the functions, that you could need in the future, but it is easy to add them, by looking the premade code.

>
>
> --
> //Aho

*****************************
Angel

Re: Interacting rooms internet page............

<ji5iufFde15U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=579&group=comp.lang.php#579

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: comp.lang.php
Subject: Re: Interacting rooms internet page............
Date: Thu, 30 Jun 2022 14:23:42 +0200
Lines: 59
Message-ID: <ji5iufFde15U1@mid.individual.net>
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
<j06f32F1adnU1@mid.individual.net>
<7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
<ji5b2qFc54rU1@mid.individual.net>
<9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net yVdlZM8r8uScx0RuDb4doA8xd/lOktThzZEtyhaLsTEJWb3GtC
Cancel-Lock: sha1:Ci4g50WKQkgaHrI/VZaSN8XeoAE=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-US-large
In-Reply-To: <9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>
 by: J.O. Aho - Thu, 30 Jun 2022 12:23 UTC

On 30/06/2022 12.56, Angel wrote:
> J.O. Aho kirjutas Neljapäev, 30. juuni 2022 kl 12:09:39 UTC+2:
>> On 29/06/2022 18.58, Angel wrote:
>>> J.O. Aho kirjutas Kolmapäev, 24. november 2021 kl 11:31:23 UTC+2:
>>>> On 24/11/2021 10.15, We wrote:
>>>>> ilist.php
>>>>
>>>> Use a git repository for your files, do not post them here, and please
>>>> stop spamming the usergroups with your trash messages.
>>>
>>> Have You looked carefully the code ?
>> Send the git repository link and maybe can think of looking at it, until
>> then Kristjan please stop behaving like Nazi-Russia.
>
> I have thought on putting things there, but I have found out, that it is better to put them here, because of the complexness of the procedures.

Both Github and GitLab provides simple examples of how to set up things,
it's more or less copy past, kind of what you do with your code.

after that it's just do your changes

git commit -a -m "your comment about the changes"
git push

As I pointed out, this will make it a lot easier for others to see your
code and get it with the indentations that makes to code a lot easier to
read and you don't have figure out what file is called what. Everyone
can track the changes and if a bad change was made it possible to revert
that one.
Also it will be possible to others who are interested in your project to
contribute in a simple way and for you it will be easier to decide what
changes you want to be included and which not.
And last you would have a larger audience than these few usergroup you
are pestering with you smiles posts.

>>> What do You think of the small database file data.php ?
>>> I guess You and many others too could use it to make faster apps.
>> PHP is slow and you database will suffer with increase number of data.
>
> No, there will be no problems with it, because the data amounts do no matter,

Of course it matters, the more data the longer time it takes for
unserialize and then you have all the data in memory it will also cause
issues with big databases as you have memory limits in php by default
set to quite small numbers.

Compare that with accessing a mysql/postgresql/sqlite database, you will
only get the data that you are looking for, so the memory imprint is a
lot smaller.

PS. If your news client don't strip of the line 'dash dash space' and
the following rows, then do that yourself, it's bad to keep footers of
previous posts, as bad as replying to years old posts.

--
//Aho

Re: Interacting rooms internet page............

<2d068219-2447-4f91-afb0-d13ca31f6567n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=701&group=comp.lang.php#701

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a05:620a:15e7:b0:6cb:e3bc:5844 with SMTP id p7-20020a05620a15e700b006cbe3bc5844mr19618162qkm.774.1664969695366;
Wed, 05 Oct 2022 04:34:55 -0700 (PDT)
X-Received: by 2002:a25:8587:0:b0:6be:6e7c:1d23 with SMTP id
x7-20020a258587000000b006be6e7c1d23mr3486439ybk.410.1664969694974; Wed, 05
Oct 2022 04:34:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Wed, 5 Oct 2022 04:34:54 -0700 (PDT)
In-Reply-To: <ji5iufFde15U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.135; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 82.131.37.135
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
<j06f32F1adnU1@mid.individual.net> <7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
<ji5b2qFc54rU1@mid.individual.net> <9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>
<ji5iufFde15U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2d068219-2447-4f91-afb0-d13ca31f6567n@googlegroups.com>
Subject: Re: Interacting rooms internet page............
From: he12091983@gmail.com (Whe)
Injection-Date: Wed, 05 Oct 2022 11:34:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 31638
 by: Whe - Wed, 5 Oct 2022 11:34 UTC

Newer code:

a.php
<html>
<head>
<link rel="icon" style="width:15px; height=15px; background-color: #76FEFF; color: #76FEFF;"/>

<style>
input {
color: #76FEFF;
}

body {
/*
background-image: url("img.jpg");

background-repeat: repeat;
background-size: 100%;
*/

background-color: #76FEFF;

}

..main12 {
text-decoration:none;
color: #76FEFF;
font-weight: bold;
background-color: white;
border: 1px solid white;
border-radius: 10px 10px;
padding: 5px;
font-weight:bold;
} ..main1 {
text-decoration:none;
color: white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:775px;
}

..main12 {
text-decoration:none;
color: #76FEFF;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
vertical-align: middle;
width:535px;
}

..main2 {
color: white;
}

..main3 {
text-decoration:none;
color: #76FEFF;
font-weight: bold;
background-color: white;
border: 1px solid white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:100px;
display:block;

}

..w1 {
color: white;
} ..w2 {
color: white;
display:inline-block;
} ..pwd {
color: #76FEFF;
display:inline-block;
}

..w21 {
color: white;
display:block;
}

</style>
</head>
<body>
<h1 class="main1">
</h1>
<h1 class="main12" style="line-height: 45px;">W e l c o m e . T e r e t u l e m a s t .</h1>
<h1 class="main1">
</h1>

<?php

include("func.php");
include("data.php");

class Password extends Dobj{
var $content;
}

$dirs = array_filter(glob('*'), 'is_dir');

$cannotcreate=false;

if(count($dirs)>60) {
$cannotcreate=true;
}

if(!empty($_POST['rname'])&&($_POST['rname']!=" ")&&!empty($_POST['rname'])&$cannotcreate==false) {
$_POST['rname'] = strip_tags($_POST['rname']);
$_POST['rname']=substr($_POST['rname'],0, 100);
$_POST['rname'] = str_replace(' ', 'space21326', $_POST['rname']);
$_POST['rname'] = str_replace(',', 'comma21326', $_POST['rname']);
$_POST['rname'] = str_replace('?', 'q21326', $_POST['rname']);
$_POST['rname'] = str_replace('\'', 'ukom21326', $_POST['rname']);
mkdir($_POST['rname'], 0755);

if(!empty($_POST['password'])&&$_POST['password']!="") {
$myd=new Data();
$tabls=array();
$pwd1=new Password();
$pwd1->content=$_POST['password'];
$pwdt=array();
$pwdt[]=$pwd1;
$tabls[]=$pwdt;
$myd->dtables=$tabls;
$myd->saveobjecttable("Password");

$file = 'Password.dat';
$newfile = 'Password.dat';
if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
} chmod($_POST['rname'].'/'.$newfile, 0700);

unlink("Password.dat");
}

$file = 'a2.php';
$newfile = 'a.php';
if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
} chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'renewing.php';
$newfile = 'renewing.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'ilist.php';
$newfile = 'ilist.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'findlastmdate.php';
$newfile = 'findlastmdate.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

$file = 'func.php';
$newfile = 'func.php';

if (!copy($file, $_POST['rname'].'/'.$newfile)) {
echo "Error\n";
}

chmod($_POST['rname'].'/'.$newfile, 0744);

}

$dirs = array_filter(glob('*'), 'is_dir');

if(count($dirs)>0) {
echo "<h2 class='main2'>Topics</h2>";
}

$dirs = array_filter(glob('*'), 'is_dir');

foreach ($dirs as $file) {
$file2= str_replace('space21326', '&nbsp;', $file);
$file2= str_replace('comma21326', ',', $file2);
$file2= str_replace('q21326', '?', $file2);
$file2= str_replace('ukom21326', '\'', $file2);
if($file=="theclickgame") continue;

$dir1='//'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$output = file_get_contents('http:'.$dir1.$file.'/findlastmdate.php');
if($output!="") {
$date12=date("d.m.Y H:i:s", strtotime($output));
$d_start = new DateTime($date12);
$currentdate = date('d.m.Y H:i:s', time());
$d_end = new DateTime($currentdate);
$diff = $d_start->diff($d_end);
$delete1=false;
if(!($diff->format('%d')<1000||$diff->format('%d')==1000&&$diff->format('%h')<1))
$delete1=true;
if($delete1) {
rrmdir('/'.$file);
continue;
} }
echo '<a class="main12" href=\'http:'.$dir1.$file.'/a.php\'>'.$file2.'</a>';
echo "<p></p>";
$path_parts = pathinfo($file.'/Msg.dat');
if(!class_exists($path_parts['filename'])) {
continue;
} }

?>
<p style="height:50px;"> </p>

<form method="POST">
<p class="w2">
Topic:
</p>
<input name="rname"/>
<p class="w">
</p>
<input type="submit" class="main3" value="Create"/>
</form>
<p></p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

</body>
</html>
a2.php
<html>
<head>
<link rel="icon" style="width:15px; height=15px; background-color: #76FEFF; color: #76FEFF;"/>

<style>
input {
color: #76FEFF;
}

body {
background-color: #76FEFF;
}

..file1 {
text-decoration: none;
color: #76FEFF;
}

..main1 {
text-decoration:none;
color: #76FEFF;
background-color: white;
border: 1px solid white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:100px;
}

..main2 {
color: white;
margin-top:-15px;
}

..main3 {
text-decoration:none;
color: #76FEFF;
background-color: white;
border: 1px solid white;
border-radius: 5px 5px;
padding: 5px;
font-weight:bold;
width:100px;
}

..main4 {
color: white;
width: 140px;
}

..main5 {
color: white;
margin-top:-15px;
margin-bottom:1px;
} ..main6 {
color: white;
margin-top:15px;
width:600px;
overflow-wrap: break-word;
} ..main7 {
margin-bottom:1px;
}

..text1 {
color: #76FEFF;
width: 538px;
height: 29px;
margin-top:-15px;
overflow-wrap: break-word;
}

textarea {
color: black;
} form {
line-height: 1.4;
}

..a1 {
line-height: 1.4;
width: 561px;
height: 357px;
overflow-y: auto;
overflow-x: hidden;
background-color: white;
overflow-wrap: break-word;
color: #76FEFF;
}

..a1 p {
height:0.001%;
margin-bottom:-15px;
} ..nameslist {
margin-bottom:15px;
} </style>
<script>
function imgError(image) {
image.onerror = "";
image.src = "../noimage.jpg";
image.style="background-color: #848587;";
image.width="40px";
image.height="40px";
return true;
} </script>
</head>
<body onload="a00000()">

<?php

if(empty($_POST)) {

$_POST['text0']="";
$_POST['myname']="";
$_POST['text1']="";

}

include("func.php");

$size = 0;

$files = glob('uploads/*.*');
usort($files, function($a, $b) {
$a=filemtime($a) < filemtime($b);
if($a==true) $a=1; else $a=0;
return $a;

});
$idx=0;

$files = array_reverse($files, true);

if(is_dir("uploads")) {
foreach($files as $file) {
if($idx==count($files)-1) break;
$filesize = filesize($file);
$size+=$filesize;
$idx++;
}
Click here to read the complete article

Re: Interacting rooms internet page............

<jq5a87Fl2gaU3@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=702&group=comp.lang.php#702

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: comp.lang.php
Subject: Re: Interacting rooms internet page............
Date: Wed, 5 Oct 2022 14:05:27 +0200
Lines: 6
Message-ID: <jq5a87Fl2gaU3@mid.individual.net>
References: <11482d7b-969e-44e9-b033-078eaa7ca76fn@googlegroups.com>
<j06f32F1adnU1@mid.individual.net>
<7fe65642-d624-4c4b-913d-c4a195863863n@googlegroups.com>
<ji5b2qFc54rU1@mid.individual.net>
<9a8598f8-6d60-4a77-99a4-710c243f3c7an@googlegroups.com>
<ji5iufFde15U1@mid.individual.net>
<2d068219-2447-4f91-afb0-d13ca31f6567n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net /SUIL6c5nm/AWIbUUk93KgUpBdMMY7Lpk4gjO6buOe/M5eFLEw
Cancel-Lock: sha1:d8EItaB5YfmyB+8RVHvXjPIQ8/Q=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
Content-Language: en-US-large
In-Reply-To: <2d068219-2447-4f91-afb0-d13ca31f6567n@googlegroups.com>
 by: J.O. Aho - Wed, 5 Oct 2022 12:05 UTC

On 05/10/2022 13.34, Whe wrote:
> Newer code:

https://www.youtube.com/watch?v=iv8rSLsi1xo

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor