Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1] 2   Go Down

Author Topic: [Completed] The Subword Finder  (Read 8045 times)

0 Members and 1 Guest are viewing this topic.

mit

[Completed] The Subword Finder
« on: May 08, 2006, 09:31:21 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Hardly much of a project, but still, pretty fun to use. This script lets you find words within words, so, say you put "fun" in, one of the answers might be "dysfunctional", amoung about 30 others. Can find anything cool in it?

http://www.kousougames.co.uk/WordFinder

Coded by me, wordlist by someone who I'm not sure of.
« Last Edit: April 22, 2015, 01:22:50 am by 4Sword »
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games

mit

Re: The Subword Finder
« Reply #1 on: May 08, 2006, 09:39:50 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Heh heh, just a few :P
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #2 on: May 09, 2006, 12:57:21 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 221
Nice job! How did you get it to read another file without it saying that in the source? I've been trying to figure that out for a while.
Logged
Re: The Subword Finder
« Reply #3 on: May 09, 2006, 01:09:40 am »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
I believe its php, php source code is not included in the view source button. Good job.
Logged
  • Netterra Virtual Pets
Re: The Subword Finder
« Reply #4 on: May 09, 2006, 08:46:26 am »
  • *
  • Reputation: +10/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1469
AbSolutely sol, theres loads for you, pitty theres none for me. 

It works great, but you missing an important word on it: hippopotomonstrosesquipedalephobia, i dont see it :P
« Last Edit: May 09, 2006, 08:48:18 am by MaJoRa »
Logged
  • Elliott Parkinson
Re: The Subword Finder
« Reply #5 on: May 09, 2006, 09:29:26 am »
  • Fendez Coder
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1128
Very nice.

I hope you're keeping a record of every word searched for *market research*
Logged





Och vi som väntar på något gott vi väntar alltid för länge jag vet, jag vet
men ett liv med låga krav är som sommar utan sol och vinter utan snö
Och vem vill leva så
  • Fendez Games

mit

Re: The Subword Finder
« Reply #6 on: May 09, 2006, 03:27:06 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Heh, the wordlist doesn't have everything, but at 264,500 words it isn't bad.

And yes, it's PHP, which is run on the server. Not the best programming, but meh, here's the source:
Code: [Select]
<form method="GET">
<input type="text" name="search" value="<?php echo $_GET["search"]; ?>">
<input type="submit" value="Search">
</form>
<?php
if ($_GET["search"]){
$_GET["search"]=strtolower($_GET["search"]);
$Listfopen("WordList.txt","r");
while (!
feof($List)) {
$buffer fgets($List4096);
if (
substr_count($buffer$_GET["search"])>0) {echo "<br>".str_replace($_GET["search"],"<span style=&#39;color:red&#39;>".$_GET["search"]."</span>",$buffer);}
}}
?>
It reads it line by line, because if it reads it all at once the server overloads >_<

Some of my favorite finds are:
therapists
skyscraper
manslaughter
mermaids
erotic - actually, there's tons for rot, lol...
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #7 on: May 09, 2006, 03:45:02 pm »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
Heh, the wordlist doesn't have everything, but at 264,500 words it isn't bad.

And yes, it's PHP, which is run on the server. Not the best programming, but meh, here's the source:
Code: [Select]
<form method="GET">
<input type="text" name="search" value="<?php echo $_GET["search"]; ?>">
<input type="submit" value="Search">
</form>
<?php
if ($_GET["search"]){
$_GET["search"]=strtolower($_GET["search"]);
$Listfopen("WordList.txt","r");
while (!
feof($List)) {
$buffer fgets($List4096);
if (
substr_count($buffer$_GET["search"])>0) {echo "<br>".str_replace($_GET["search"],"<span style=&#39;color:red&#39;>".$_GET["search"]."</span>",$buffer);}
}}
?>
It reads it line by line, because if it reads it all at once the server overloads >_<

Some of my favorite finds are:
therapists
skyscraper
manslaughter
mermaids
erotic - actually, there's tons for rot, lol...

I suggest using POST rather than GET, I have heard its faster. Anyway:
Thats not too bad. Im not sure about the buffer stuff. What does feof do?
Logged
  • Netterra Virtual Pets
Re: The Subword Finder
« Reply #8 on: May 09, 2006, 03:58:45 pm »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
Logged
  • Broken Kings [Temp Site]

mit

Re: The Subword Finder
« Reply #9 on: May 09, 2006, 04:02:44 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Heh... probably not.

I use POST normally, but I wanted to use GET so you could link to a certain one just by giving the URL. And feof is just do until the end of the file.

Edit: Man, I just noticed how much I say "heh"...
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #10 on: May 09, 2006, 04:07:33 pm »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
Way to fix So there arent one letter searches:
Code: [Select]
<form method="GET">
<input type="text" name="search" value="<?php echo $_GET["search"]; ?>">
<input type="submit" value="Search">
</form>
<?php
if (strlen($_GET["search"])>1){
$_GET["search"]=strtolower($_GET["search"]);
$Listfopen("WordList.txt","r");
while (!
feof($List)) {
$buffer fgets($List4096);
if (
substr_count($buffer$_GET["search"])>0) {echo "<br>".str_replace($_GET["search"],"<span style=&#39;color:red&#39;>".$_GET["search"]."</span>",$buffer);}
}}
?>

Fixed. Just put that in.
Logged
  • Netterra Virtual Pets

mit

Re: The Subword Finder
« Reply #11 on: May 09, 2006, 04:18:28 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #12 on: May 12, 2006, 10:01:09 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 221
This is a little late but... PHP! O0o0o0o! I want to learn PHP now. I wonder if it's a good idea to try to learn PHP at the same time as C++...

EDIT: Btw, do you have to have access to the actual server in order to use PHP? Sorry if that's a stupid question.
« Last Edit: May 12, 2006, 10:02:54 pm by Soulja »
Logged
Re: The Subword Finder
« Reply #13 on: May 12, 2006, 10:37:07 pm »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
This is a little late but... PHP! O0o0o0o! I want to learn PHP now. I wonder if it's a good idea to try to learn PHP at the same time as C++...

EDIT: Btw, do you have to have access to the actual server in order to use PHP? Sorry if that's a stupid question.
Erm, you just have to be able to write .php documents. You dont need acces to the server as far as I know. I write php alot.
Logged
  • Netterra Virtual Pets

mit

Re: The Subword Finder
« Reply #14 on: May 13, 2006, 09:00:37 am »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
PHP is much much easier than C++, the whole language is more... relaxed, I guess. For instance you could set a variable to a string, and then add an integer to it, and it'll work.

Here's some of my other things: http://www.kousougames.co.uk/?act=php_examples
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #15 on: May 14, 2006, 07:03:23 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 221
Cool! I got a tutorial at w3schools.com and I'm gonna learn it. ;)
Logged

mit

Re: The Subword Finder
« Reply #16 on: May 14, 2006, 07:05:44 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Best place to learn it is php.net.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: The Subword Finder
« Reply #17 on: May 14, 2006, 07:16:28 pm »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
w3c schools only teaches you the basics. I suggest getting PHP 5 fast and easy, a book. You could probly find a torrent of it. ITS GREAT.
Logged
  • Netterra Virtual Pets
Re: The Subword Finder
« Reply #18 on: May 15, 2006, 01:18:44 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 221
Best place to learn it is php.net.

Thanks! I didn't even think of going to the official website. I'm stupid sometimes  :D

w3c schools only teaches you the basics. I suggest getting PHP 5 fast and easy, a book. You could probly find a torrent of it. ITS GREAT.

I don't know if I can afford it... I just spent like $80 at the bookstore last week on some manga and a C++ book. (The C++ book wasn't even any good, it was all n00b stuff...) Is it expensive?
Logged
Re: The Subword Finder
« Reply #19 on: May 15, 2006, 01:20:57 am »
  • Its the joeshmo!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 694
Best place to learn it is php.net.

Thanks! I didn't even think of going to the official website. I'm stupid sometimes  :D

w3c schools only teaches you the basics. I suggest getting PHP 5 fast and easy, a book. You could probly find a torrent of it. ITS GREAT.

I don't know if I can afford it... I just spent like $80 at the bookstore last week on some manga and a C++ book. (The C++ book wasn't even any good, it was all n00b stuff...) Is it expensive?

25 dollars at the most. It is an exelant book.
Logged
  • Netterra Virtual Pets
Pages: [1] 2   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.07 seconds with 77 queries.

anything