Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-01-05, 11:20 AM   #1
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Tiny text script thing-a-ma-bob

Anyone know of a light script that can overwrite a single text file from a form? In other words, I want to be able to paste a bunch of text into a <textarea> of a form, hit submit, and have it overwrite what ever info is on data.txt, for example.

I can probably reverse engineer some bigger script that stores data on flatfiles and figure out how it's done, but if anyone knows of a small script that does that, I'd be eternally grateful, or at least until I fuck it all up.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2006-01-05, 11:28 AM   #2
MadMax
"Without evil there can be no good, so it must be good to be evil sometimes" ~ Satan
 
MadMax's Avatar
 
Join Date: Aug 2004
Location: Motor City, baby, where carjacking was invented! Now GIMME THOSE SHOES!
Posts: 2,385
You can use part of Recip Philes for that, and it's already on your server . Hit me up on ICQ if you're on tonight and we'll work it out

Last edited by MadMax; 2006-01-05 at 11:35 AM..
MadMax is offline   Reply With Quote
Old 2006-01-05, 12:24 PM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Code:
  $filename = "/full/path/to/filename";
  $handle = fopen($filename,"wb");
  fwrite($handle,$_REQUEST['textareaname']);
  fclose($handle);
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2006-01-05, 01:34 PM   #4
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Awesome, Chris! Thanks tons. Works like a charm.

Madmax, I'll probably hit you up anyway just to keep your productivity levels low.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2006-01-05, 04:38 PM   #5
Chop Smith
Eighteen 'til I Die
 
Chop Smith's Avatar
 
Join Date: Apr 2003
Location: Mississippi
Posts: 2,168
Send a message via ICQ to Chop Smith
Quote:
Originally Posted by Useless Warrior
...Madmax, I'll probably hit you up anyway just to keep your productivity levels low.
Lets keep Max's productivity high. February is closing in on him.
__________________
Chop Smith is offline   Reply With Quote
Old 2006-01-05, 07:04 PM   #6
MadMax
"Without evil there can be no good, so it must be good to be evil sometimes" ~ Satan
 
MadMax's Avatar
 
Join Date: Aug 2004
Location: Motor City, baby, where carjacking was invented! Now GIMME THOSE SHOES!
Posts: 2,385
Quote:
Originally Posted by Chop Smith
Lets keep Max's productivity high. February is closing in on him.
Bastards
MadMax is offline   Reply With Quote
Old 2006-01-05, 07:21 PM   #7
Chop Smith
Eighteen 'til I Die
 
Chop Smith's Avatar
 
Join Date: Apr 2003
Location: Mississippi
Posts: 2,168
Send a message via ICQ to Chop Smith
Quote:
Originally Posted by MadMax
Bastards
Say UW, is this an upgrade from Cocksuckers? And I am not productive so answer your ICQ as you have a chance
__________________
Chop Smith is offline   Reply With Quote
Old 2006-01-05, 07:29 PM   #8
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by Chop Smith
Say UW, is this an upgrade from Cocksuckers? And I am not productive so answer your ICQ as you have a chance
It's far less offensive, but no where near as endearing.

ICQ? How do you spell that? I'll google it.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:38 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc