GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Looking for a programmer to do THIS for me... (https://gfy.com/showthread.php?t=159137)

buddyjuf 07-31-2003 04:55 PM

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! :thumbsup

NetRodent 07-31-2003 05:01 PM

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;


hudson 07-31-2003 05:08 PM

line 7:

if(length($_) hahahaha 7) {

what does "hahahaha 7" mean?

chowda 07-31-2003 05:09 PM

j script

fiveyes 07-31-2003 05:12 PM

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.

SpaceAce 07-31-2003 05:12 PM

Quote:

Originally posted by hudson
line 7:

if(length($_) hahahaha 7) {

what does "hahahaha 7" mean?

It's two equals signs together.

= =

SpaceAce

buddyjuf 07-31-2003 05:15 PM

hi netrodent, can you please contact me?

thanx in advance :thumbsup

AssFairy 07-31-2003 05:17 PM

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 :thumbsup

hudson 07-31-2003 05:19 PM

Thanks guys for explaining to me about the two equal signs, and nice bit of code there NetRodent

buddyjuf 07-31-2003 05:20 PM

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 :thumbsup

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

please contact me :thumbsup

m4tt 07-31-2003 05:27 PM

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);
?>


buddyjuf 07-31-2003 05:33 PM

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

NetRodent 07-31-2003 05:46 PM

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;) {".

ryph 07-31-2003 05:47 PM

mang, if ya still need this, aim: wreck3d

AssFairy 07-31-2003 06:01 PM

Quote:

Originally posted by bdjuf


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

please contact me :thumbsup

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.

buddyjuf 07-31-2003 06:12 PM

hey guys
netrodent helped me with the script and its working now

thank you all of you :thumbsup

AssFairy 07-31-2003 06:13 PM

Quote:

Originally posted by bdjuf
hey guys
netrodent helped me with the script and its working now

thank you all of you :thumbsup

:thumbsup

Rui 07-31-2003 06:18 PM

netrodent - care to share the goods (once again) ;) ?


All times are GMT -7. The time now is 06:50 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123