Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
myrmepropagandist
myrmepropagandist
@futurebird@sauropods.win  ·  activity timestamp last week

Hey!

I'm looking for some simple to understand and impressive examples of fun things teens might want to do with PHP.

Ideally interactive things their friends might want to try on a local intranet server.

PHP mixes with HTML in a really fun way, and I remember doing some neat tricks with it... but I'm very rusty.

What are the cutest things you've ever seen done with PHP?

(We will get to the issues with security later. Fun first.)

#php #Apache #chmod777

  • Copy link
  • Flag this post
  • Block
der.hans
der.hans
@lufthans@mastodon.social  ·  activity timestamp last week

@futurebird PHP mixes with plain text ( incl markup like HTML )

I wrote a debian configuration mgt system in PHP ( like Chef and Puppet before Chef existed )

Maybe start w PHP generating cowsay and figlet output, then generate images via ImageMagick ( incl alt-text )

I also used PHP to take text and generate html, PDF and formatted plain text output. I've long switched to AsciiDoc :)

What about a madlibs program? For 2nd project allow it to randomly select values, incl from memes and emojis

  • Copy link
  • Flag this comment
  • Block
David Chisnall (*Now with 50% more sarcasm!*)
David Chisnall (*Now with 50% more sarcasm!*)
@david_chisnall@infosec.exchange  ·  activity timestamp last week

@futurebird

I wrote a scrabble game in PHP (which, to avoid trademark issues, was called 'Leonard Da Quirm's Making Words Out Of Letters That Have Been Jumbled Up Game' (or whatever the correct quote was). It stored the game state as a serialised object in the filesystem after each move, so it could then give you a view of the entire game history at the end.

It was way back in 2003, so used a table for the board, but used some nice CSS styling to make the tiles look like tiles. Each empty slot on the board was a text box, so you would enter each letter in the place you wanted to put it. Doing your move was a complete form submit, which then checked that the letters you'd placed were ones that existed and then grep'd for the word you found in a word list file. I used grep in a child process initially because it was easy, but it also turned out to be really fast so I never bothered to make it faster.

We played it quite a bit when I was a student. I probably have the code somewhere, but it's almost certainly totally awful in every possible way and not something anyone should ever look at.

  • Copy link
  • Flag this comment
  • Block
Fox Ritch :fjoxicon:🇩🇪
Fox Ritch :fjoxicon:🇩🇪
@fox@social.hostnetwork.xyz  ·  activity timestamp last week

@futurebird you could probably make a simple instant messenger with php

  • Copy link
  • Flag this comment
  • Block
myrmepropagandist
myrmepropagandist
@futurebird@sauropods.win  ·  activity timestamp last week

@fox

That's a good idea. Although it brings back the authentication problem, which I need to help them solve.

I should work on that today.

  • Copy link
  • Flag this comment
  • Block
Fox Ritch :fjoxicon:🇩🇪
Fox Ritch :fjoxicon:🇩🇪
@fox@social.hostnetwork.xyz  ·  activity timestamp last week

@futurebird just make sure you can't inject sql code via login prompts.

Alternatively you could just make it a shoutbox and no care about auth

  • Copy link
  • Flag this comment
  • Block
der.hans
der.hans
@lufthans@mastodon.social  ·  activity timestamp last week

@fox @futurebird alternatively, make sure you *can* inject sql code via login prompts :)

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct