php forum
php mysql forum
php mysql smarty
 
Topic Options
#101239 - 09/22/00 03:51 PM .txt transfer
Em8 Offline
Member

Registered: 09/03/00
Posts: 183
Loc: Red Point, Jupiter
How would I take a .txt file and use a script to open it up and take whats in the .txt file and turn all of that into a $ varible? Thanks. I'm trying to mess with alot of my scripts and I need to know how to do this.

Thanks!

------------------
Wanna See A Real BB?...So your on one, But heres another!

<FONT COLOR="#6699cc" SIZE="1" FACE="Verdana, Arial">This message has been edited by Em8 on September 22, 2000 at 03:54 PM</font>
_________________________
<IMG SRC="http://opena.virtualave.net/cgi-bin/rand.pl" border=0>

Top
#101240 - 09/22/00 03:57 PM Re: .txt transfer
Mark Badolato Offline
P.I.T.A. / Programmer

Registered: 09/08/00
Posts: 836
Loc: Land O' Cactus
Turn all fo that into a variable how?

As:
my $var = [entire contents of the file];

or:
file contains:
blah = 1
blah2 = cheese

and you want your program to now have
$blah with a value of 1
and $blah2 with a value of 'cheese'?

--mark
_________________________
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan

Top
#101241 - 09/22/00 09:13 PM Re: .txt transfer
Em8 Offline
Member

Registered: 09/03/00
Posts: 183
Loc: Red Point, Jupiter
I dunno if that was it but any way, I wan't to make a script and to make it easier on people who don't know perl, they type in the cuss word in the .txt file instead of looking for the varibles.

so badw.txt contains:
Code:
code:


How would I take all that into a single $ like $badwords in another CGI script?

------------------
...........

<FONT COLOR="#6699cc" SIZE="1" FACE="Verdana, Arial">This message has been edited by Em8 on September 22, 2000 at 09:14 PM</font>
_________________________
<IMG SRC="http://opena.virtualave.net/cgi-bin/rand.pl" border=0>

Top
#101242 - 09/22/00 10:19 PM Re: .txt transfer
Mark Badolato Offline
P.I.T.A. / Programmer

Registered: 09/08/00
Posts: 836
Loc: Land O' Cactus
It would be better for you to structure your file as:

bad1
bad2
bad3
bad4

then just do:

Code:
code:


You now have your words in the @bad_words array which you can check against your data.

Andy: No, I still wouldn't slurp. But if its a small file, then this is one instance where I don't get too mad at people for doing it

--mark
_________________________
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan

Top
#101243 - 09/22/00 10:21 PM Re: .txt transfer
The Team Offline
Moderator

Registered: 08/11/00
Posts: 182
Loc: yes


------------------
Da Wannabe Cannuck

Top
#101244 - 09/23/00 11:33 AM Re: .txt transfer
Em8 Offline
Member

Registered: 09/03/00
Posts: 183
Loc: Red Point, Jupiter
_________________________
<IMG SRC="http://opena.virtualave.net/cgi-bin/rand.pl" border=0>

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks