Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-31-2003, 04:55 PM   #1
buddyjuf
Guest
 
Posts: n/a
Looking for a programmer to do THIS for me...

Hey guys,
I need a script that will look in a text file for all the 7 letter lines and put them on another text file.

budget --> 20-25$

thanx in advance guys!
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:01 PM   #2
NetRodent
Confirmed User
 
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
Save your money. The following should do what you want. I didn't try running it so there may be typos.

Code:
$input_file = '/path/to/input/file';
$output_file = '/path/to/output/file';

open(I,"<$input_file") || die "Cannot read $input_file: $!\n";
open(O,">$output_file") || die "Cannot write $output_file: $!\n";
while(<I>) {
   chomp;
   $_ =~ s/^\s+//;
   $_ =~ s/\s+$//;
   if(length($_) hahahaha 7) {
      print O $_."\n";
   }
}
close I;
close O;
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
--H.L. Mencken

Last edited by NetRodent; 07-31-2003 at 05:17 PM..
NetRodent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:08 PM   #3
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
line 7:

if(length($_) hahahaha 7) {

what does "hahahaha 7" mean?
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:09 PM   #4
chowda
Confirmed User
 
Join Date: Jun 2003
Location: Gooch city
Posts: 9,527
j script
__________________
Someone finds you...
2007

PS: Nationalnet is the best host I've ever had. And i tried alot of them.
chowda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:12 PM   #5
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Quote:
Originally posted by hudson
line 7:

if(length($_) hahahaha 7) {

what does "hahahaha 7" mean?
2 equal signs ( "= =" without the space) make for a "hahahaha", for some reason.
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:12 PM   #6
SpaceAce
Confirmed User
 
Join Date: Jul 2002
Location: Magrathea
Posts: 6,493
Quote:
Originally posted by hudson
line 7:

if(length($_) hahahaha 7) {

what does "hahahaha 7" mean?
It's two equals signs together.

= =

SpaceAce
SpaceAce is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:15 PM   #7
buddyjuf
Guest
 
Posts: n/a
hi netrodent, can you please contact me?

thanx in advance
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:17 PM   #8
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
I can code you an exe that runs on your own puter to do this for free, got any examples of the text you wan't filtering?

It would only take a few mins to write
__________________
I sale lube
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:19 PM   #9
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Thanks guys for explaining to me about the two equal signs, and nice bit of code there NetRodent
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:20 PM   #10
buddyjuf
Guest
 
Posts: n/a
Quote:
Originally posted by AssFairy
I can code you an exe that runs on your own puter to do this for free, got any examples of the text you wan't filtering?

It would only take a few mins to write
hey assfairy! a EXE would be great! as long as it doesnt infect my computer

please contact me
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:27 PM   #11
m4tt
So Fucking Banned
 
Join Date: May 2003
Location: San Diaygo, CA
Posts: 384
come on people... basic stuff

PHP Code:
<?php

    $output 
= array();
    
$handle = @fopen("text.txt""r");
    
        while(!
feof($handle))    {
            
$buffer = @fgets($handle4096);
            
$buffer trim($buffer);
            
            if (
strlen($bufferhahahaha 7)    {
                
$output[] = $buffer;
            }
        }
        
    @
fclose($handle);
    
    
$new_handle = @fopen("output.txt""a")or die("Could not create new file.");
    
        for (
$i 0$i count($output); $i++)    {
            @
fwrite($new_handle$output[$i] . "\n");
        }
    
    @
fclose($new_handle);
?>
m4tt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:33 PM   #12
buddyjuf
Guest
 
Posts: n/a
Quote:
Originally posted by m4tt
come on people... basic stuff

PHP Code:
<?php

    $output 
= array();
    
$handle = @fopen("text.txt""r");
    
        while(!
feof($handle))    {
            
$buffer = @fgets($handle4096);
            
$buffer trim($buffer);
            
            if (
strlen($bufferhahahaha 7)    {
                
$output[] = $buffer;
            }
        }
        
    @
fclose($handle);
    
    
$new_handle = @fopen("output.txt""a")or die("Could not create new file.");
    
        for (
$i 0$i count($output); $i++)    {
            @
fwrite($new_handle$output[$i] . "\n");
        }
    
    @
fclose($new_handle);
?>
Warning: feof(): supplied argument is not a valid stream resource in /home/bdjuf/public_html/a.php on line 6
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:46 PM   #13
NetRodent
Confirmed User
 
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
Quote:
Originally posted by NetRodent
Save your money. The following should do what you want. I didn't try running it so there may be typos.

Code:
$input_file = '/path/to/input/file';
$output_file = '/path/to/output/file';

open(I,"<$input_file") || die "Cannot read $input_file: $!\n";
open(O,">$output_file") || die "Cannot write $output_file: $!\n";
while() {
   chomp;
   $_ =~ s/^\s+//;
   $_ =~ s/\s+$//;
   if(length($_) hahahaha 7) {
      print O $_."\n";
   }
}
close I;
close O;
Bah! The html filter strikes again. The "while() {" statement above should actually be "while(&lt;I&gt;) {".
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
--H.L. Mencken
NetRodent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 05:47 PM   #14
ryph
Confirmed User
 
Join Date: Oct 2002
Location: NJ
Posts: 1,215
mang, if ya still need this, aim: wreck3d
__________________
tom at ryphs dot com
ryph is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 06:01 PM   #15
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
Quote:
Originally posted by bdjuf


hey assfairy! a EXE would be great! as long as it doesnt infect my computer

please contact me
I don't do that kiddy shit, you can have uncompiled source code if you want and compile it yourself.

Post me an example of the text to [email protected] with a brief explanation of how you want to filter the text and I'll make you a program to do it.
__________________
I sale lube
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 06:12 PM   #16
buddyjuf
Guest
 
Posts: n/a
hey guys
netrodent helped me with the script and its working now

thank you all of you
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 06:13 PM   #17
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
Quote:
Originally posted by bdjuf
hey guys
netrodent helped me with the script and its working now

thank you all of you
__________________
I sale lube
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2003, 06:18 PM   #18
Rui
web
 
Join Date: Dec 2001
Location: On icq: 85-483-060
Posts: 9,533
netrodent - care to share the goods (once again) ;) ?
Rui is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.