| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | PHP programming for BBS |
Hello,
I've been toying with writing PHP doors for my board, mainly because I work
with PHP for web development and having the same programming language for
both BBS doors and my websites lets me recycle code between the two.
Anyway, I wanted to post some simple test snippets of code I've done that
work quite well on my Board, whch runs on Slackware 10.2.
First, in scfg here's my Command Line:
php -q /sbbs/php/test1.php %a %1
Here's test1.php:
This is a simple script to return the username and user number, plus a test
using ANSI.
Here's another PHP script that simply prompts for a name then returns this
name:
Though STDIN isn't generally used when using PHP for web programming, it
works similar to the way it works in C, so you can get user information.
This is my first time working with command line PHP as opposed to web
programming with PHP, and though the coding is pretty much the same, the
interaction from the user is quite different, for example using STDIN to
get input instead of an HTML form.
Anyway, I talked to DM and some other guys in IRC about this last week, and
they said to their knowledge no one had written such doors in PHP for
Sync, so figured this might be a neat way to do it snce so many folks have
PHP skills and there's so many great resources for PHP out there. ALso, it
shouldn't be too hard to take smaller PHP applications and recode them to
use a command line interface as opposed to HTML.
Take care --
Sam
---
Sam Alexander - sam.alexander(at)sidebandbbs(dot)com
icq: 5386757 [] AIM/Y!: samalex1701 [] Skype: samalex01
Jabber: samalex/sidebandbbs.com [] MSN: samalex{at}gmail.com
"Data is not information, Information is not knowledge, Knowledge is not
understanding, Understanding is not wisdom." -- Cliff Stoll
---
þ Synchronet þ SideBand BBS -[ sidebandbbs.com ]- Lorena, Texas - Your
source for Amateur Radio
--- SBBSecho 2.12-Win32
* Origin: Joe's Computer & BBS -= joesbbs.synchro.net =- (1:275/412)SEEN-BY: 10/1 3 14/250 34/999 90/1 120/228 123/500 140/1 222/2 226/0 236/150 SEEN-BY: 249/303 250/306 261/20 38 100 1404 1406 1418 266/1413 280/1027 SEEN-BY: 320/119 393/68 396/45 633/104 260 267 690/682 734 712/848 800/432 SEEN-BY: 801/161 189 2222/700 2320/100 105 200 2905/0 @PATH: 275/412 400 100 140/1 261/38 633/260 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.