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)
-   -   PHP Coders. $30 PayPal first Person who posts... (https://gfy.com/showthread.php?t=433749)

Muff 02-18-2005 11:49 PM

PHP Coders. $30 PayPal first Person who posts...
 
The code for an easy script.

Details.

I need a script that will build a list of character strings and have these variables.

& = any letter a - z
@ = any number 0 - 9

So if I input &&& it would build a list that looks like.

aaa
aab
aac
aad
...
...
zzz

If I put @&& it would build a list that looks like.

0aa
0ab
0ac
....
....
9zz

Also want to be able to add letters or numbers in combination with the variables. So if I put @89&& it would build a list that looks like.

089aa
089ab
089ac
.....
.....
989zz

Doesn't need a fancy interface just tell me where I need to change inputs in the file and where to specify the output file and that's it.

When you post leave your PayPal addy. As soon as I get it to work I'll send you payment. Feel free to bump :)

labeledas 02-18-2005 11:52 PM

you wan tot control how many you get in the list

Muff 02-18-2005 11:52 PM

I should add. The first person who posts working code that does exactly what I need.

Muff 02-18-2005 11:53 PM

Quote:

Originally Posted by labeledas
you wan tot control how many you get in the list

No. I want it all :)

Muff 02-19-2005 12:13 AM

Bump!!!!

Pete-KT 02-19-2005 12:15 AM

good luck on getting that for 30 I wouldnt waste my time doin that for 30 bucks sorry

Slap Dot 02-19-2005 12:16 AM

Give me a minute

brand0n 02-19-2005 12:16 AM

lotta code for 30 bucks

bump it to 100

Slap Dot 02-19-2005 12:18 AM

PHP Code:

<? for($i=65;$i<91;$i++) { ?>
        <a href="<?=$PHP_SELF?>?letter=<?=chr($i)?>"><?=chr($i)?></a>
    <?    } ?>


Pete-KT 02-19-2005 12:18 AM

my thoughts exactly

Muff 02-19-2005 12:18 AM

Quote:

Originally Posted by brand0n
lotta code for 30 bucks

bump it to 100


I keep hearing that. If it's alot of code how long would it take for someone to code it. In all honesty I figured someone would have had it posted by now.

Serge Litehead 02-19-2005 12:20 AM

if no one calls on this i could make it. will take about 1h.

and by "any" you mean random, right?

Slap Dot 02-19-2005 12:21 AM

I read your post wrong, I listed code for an easy A-Z index. Haha, sorry. I will add the correct code in a minute

Muff 02-19-2005 12:25 AM

Quote:

Originally Posted by holograph
if no one calls on this i could make it. will take about 1h.

and by "any" you mean random, right?

I should have specified the random part. Should build the list in sequence. from A- Z and 0 - 9.

I figured $30 was reasonable guess not. ICQ me if you want to do it 265054864

Serge Litehead 02-19-2005 12:27 AM

btw that "any" was confusing, its not any nor random, its from 0 to 9 & from A to Z
by your example

Serge Litehead 02-19-2005 12:28 AM

Quote:

Originally Posted by Muff
I should have specified the random part. Should build the list in sequence. from A- Z and 0 - 9.

I figured $30 was reasonable guess not. ICQ me if you want to do it 265054864

yup,

ok gotta load my icq 1 min

Muff 02-19-2005 12:29 AM

Quote:

Originally Posted by holograph
btw that "any" was confusing, its not any nor random, its from 0 to 9 & from A to Z
by your example


That's right.

Muff 02-19-2005 12:31 AM

Quote:

Originally Posted by holograph
yup,

ok gotta load my icq 1 min

If slap does he gets it. Add me anyways though, I always have little things like this that need to be done.

labeledas 02-19-2005 12:46 AM

just did a quick assesmnet and htis is a pretty complicated request for $30

Muff 02-19-2005 12:52 AM

holographs got it.

Thanks.

labeledas 02-19-2005 01:09 AM

damn good job man

Muff 02-19-2005 01:19 AM

Quote:

Originally Posted by labeledas
damn good job man

Well he's working on it. Didn't realize it was that complicated. It would suck if someone worked on it only to post a few minutes later and get nothing.

DaveKnell 02-19-2005 01:21 AM

Quite a useful exercise: might give this as a problem to people we interview for coding jobs. Here's what I just knocked up - had 10 minutes to kill before the paper shop opens - just in case anyone else is in need of a similar morsel of code. No guarantees: it's worked a couple of times. Could be improved as well - the obvious one would be to have it cope with an arbitrary number of ?s and @s.

Dave

<?
// Template
$template = "?0?@";
$fn = "/tmp/test";
// Work out limit variables
$ll = array();
$ul = array();
$cp = array();
$ix = 0;
for ($i=0; $i<strlen($template); $i++) {
if (substr($template, $i, 1) hahahaha '@') {
$ll[$ix] = 48;
$ul[$ix] = 57;
$cp[$ix++] = $i;
} elseif (substr($template, $i, 1) hahahaha '?') {
$ll[$ix] = 97;
$ul[$ix] = 122;
$cp[$ix++] = $i;
}
}
// Output to file
$fp = fopen($fn, "w");
for ($i0=$ll[0]; $i0<=$ul[0]; $i0++) {
for ($i1=$ll[1]; $i1<=$ul[1]; $i1++) {
for ($i2=$ll[2]; $i2<=$ul[2]; $i2++) {
$template = substr_replace($template, chr($i0), $cp[0], 1);
$template = substr_replace($template, chr($i1), $cp[1], 1);
$template = substr_replace($template, chr($i2), $cp[2], 1);
fwrite($fp, "$template\n");
}
}
}
fclose($fp);
?>

labeledas 02-19-2005 01:22 AM

ok so i should still keep workin gon mine then, i just thought holographs was a damn super genious, i am going to get head bbl

DaveKnell 02-19-2005 01:23 AM

Oh, for fuck's sake, the BBS software appears to have replaced = = (remove the space) with hahahaha in the if.. and elseif.. lines.

--Dave

Adultnet 02-19-2005 01:24 AM

yes it take some time to think how to make this..:)

Muff 02-19-2005 01:25 AM

Quote:

Originally Posted by labeledas
ok so i should still keep workin gon mine then, i just thought holographs was a damn super genious, i am going to get head bbl

You can work on it if you want to but holographs got the cash.

broke 02-19-2005 01:26 AM

Nice work Dave.

:thumbsup

Adultnet 02-19-2005 01:29 AM

nice one dave.. :)

labeledas 02-19-2005 01:29 AM

good job dave, hats off to you

Serge Litehead 02-19-2005 05:59 AM

Muff, thanks for the challage, it's a good exersise, my brains needed that.
You've got email.

Dave, pretty close.

spideriux 02-19-2005 06:41 AM

Good job Dave, but I'm late :(


All times are GMT -7. The time now is 09:14 PM.

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