can i translate perl to php? (24)

1 Name: x2l2 2005-03-15 08:20 ID:pYJMl2k6 [Del]

ups.. probabily someone talk about make a wakaba verison on php im translation some mine oldscripts from perl to php and ..
im thinking on take a look to wakaba scripts...

can i do that?

2 Name: !WAHa.06x36 2005-03-15 10:23 ID:WJr320N4 [Del]

You can, but you're not going to have fun. There's some pretty fancy Perl code in there that probably has no direct equivalent in PHP and would need to be completely rewritten. The templating code for one.

3 Name: x2l2 2005-03-15 13:31 ID:pYJMl2k6 [Del]

i know that not is an "automagic" translation >_<
probabily a lot of work....

4 Name: coda 2005-03-15 14:14 ID:cWeYlFxh [Del]

wakabaPHP by coda
<? print wakaba.pl ?>

5 Name: !WAHa.06x36 2005-03-15 14:39 ID:WJr320N4 [Del]

>>4

Stop leaking the sourcecode for my PHPerl project!

6 Name: Anonymous : 2006-01-09 09:14 ID:gIWCPiWO [Del]

sauce plz

7 Name: Anonymous : 2006-01-10 02:15 ID:Heaven [Del]

8 Name: !WAHa.06x36 : 2006-01-10 05:12 ID:Heaven [Del]

No, PHPerl is a COMPLETELY DIFFERENT PROJECT that exists only in my mind!

9 Name: Anonymous : 2006-01-11 11:20 ID:Heaven [Del]

>>8
thank god for that

10 Name: President Leechman : 2006-01-16 14:25 ID:UI+ituXi [Del]

PHP? Perl? There's no challenge in that. IRON CHEF LEECHMAN challenges you to Wakab in sendmail.cf!

11 Name: Fou-Lu!Id1gMYGA52!!UIR4DE3n : 2008-10-28 11:05 ID:j+9pHoqg [Del]

Sorry for the bump, but I'm trying to translate the Silly Names script to php...

sub make_anonymous($$$)
{

my ($ip,$time,$thread)=@_;
return S_ANONAME unless(SILLY_ANONYMOUS);
my $string=$ip;
$string.=",".int($time/86400) if(SILLY_ANONYMOUS=~/day/i);
$string.=",".$ENV{SCRIPT_NAME} if(SILLY_ANONYMOUS=~/board/i);
$string.=",".$thread if(SILLY_ANONYMOUS=~/thread/i);
srand unpack "N",hide_data($string,4,"silly",SECRET);
return cfg_expand("%G% %W%",
W => ["%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%","%O%%E%","%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%","%O%%E%","%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%"],
B => ["B","B","C","D","D","F","F","G","G","H","H","M","N","P","P","S","S","W","Ch","Br","Cr","Dr","Bl","Cl","S"],
I => ["b","d","f","h","k","l","m","n","p","s","t","w","ch","st"],
V => ["a","e","i","o","u"],
M => ["ving","zzle","ndle","ddle","ller","rring","tting","nning","ssle","mmer","bber","bble","nger","nner","sh","ffing","nder","pper","mmle","lly","bling","nkin","dge","ckle","ggle","mble","ckle","rry"],
F => ["t","ck","tch","d","g","n","t","t","ck","tch","dge","re","rk","dge","re","ne","dging"],
O => ["Small","Snod","Bard","Billing","Black","Shake","Tilling","Good","Worthing","Blythe","Green","Duck","Pitt","Grand","Brook","Blather","Bun","Buzz","Clay","Fan","Dart","Grim","Honey","Light","Murd","Nickle","Pick","Pock","Trot","Toot","Turvey"],
E => ["shaw","man","stone","son","ham","gold","banks","foot","worth","way","hall","dock","ford","well","bury","stock","field","lock","dale","water","hood","ridge","ville","spear","forth","will"],
G => ["Albert","Alice","Angus","Archie","Augustus","Barnaby","Basil","Beatrice","Betsy","Caroline","Cedric","Charles","Charlotte","Clara","Cornelius","Cyril","David","Doris","Ebenezer","Edward","Edwin","Eliza","Emma","Ernest","Esther","Eugene","Fanny","Frederick","George","Graham","Hamilton","Hannah","Hedda","Henry","Hugh","Ian","Isabella","Jack","James","Jarvis","Jenny","John","Lillian","Lydia","Martha","Martin","Matilda","Molly","Nathaniel","Nell","Nicholas","Nigel","Oliver","Phineas","Phoebe","Phyllis","Polly","Priscilla","Rebecca","Reuben","Samuel","Sidney","Simon","Sophie","Thomas","Walter","Wesley","William"],
);

}

Hehe, I don't even know php, but I need to use it in my current hosting situation...

12 Name: Anonymous : 2008-10-28 14:49 ID:Heaven [Del]

The mere fact that you're trying to rewrite wakaba in php is making my head hurt.

I really recommend looking around for a better host.

13 Name: Fou-Lu!Id1gMYGA52!!UIR4DE3n : 2008-10-28 15:17 ID:j+9pHoqg [Del]

I'm not rewriting Wakaba. I hate php, but I have n other choice, I just need the name generating part of it.

14 Name: Anonymous : 2008-10-29 13:46 ID:Heaven [Del]

Get a better host.

15 Name: larzon : 2008-11-19 08:09 ID:aeqrK3tF [Del]

any news on the ColorManagement? That would be awesome ;)

16 Name: Anonymous : 2008-11-25 06:18 ID:JCvwD8Xr [Del]

just ask your host to install perl. To be honest, any host that doesn't have Perl to bein with is not worth the money.

17 Name: Anonymous : 2008-12-05 14:58 ID:dR23MoQ2 [Del]

how can i let the title images of my boards rotate? how should i write the script?

18 Name: Fou-Lu!Id1gMYGA52!!UIR4DE3n : 2008-12-06 17:10 ID:Heaven [Del]

>>17
You can do this in JavaScript,

on a related note, I just decided to have silly names in JavaScript

19 Name: Anonymous : 2008-12-08 15:26 ID:Heaven [Del]

>>18
Enjoy your broken board.
Never use javascript for functionality if you can avoid it at all (hint: you can always avoid it). Write it properly, and use javascript later on to enhance things when possible.

20 Name: Anonymous : 2008-12-08 16:41 ID:Heaven [Del]

>>19
and to be not-a-total-jackass:

<?php
function cfg_expand($in, $grammar)
{
$out = explode("%", $in);
$c = count($out);
for ($n = 1; $n < $c; $n += 2) {
$x = $grammar[$out[$n]];
$out[$n] = cfg_expand($x[array_rand($x)], $grammar);
}
return implode("", $out);
}
$name = cfg_expand("%G% %W%", array(
"W" => array("%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%","%O%%E%","%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%","%O%%E%","%B%%V%%M%%I%%V%%F%","%B%%V%%M%%E%"),
"B" => array("B","B","C","D","D","F","F","G","G","H","H","M","N","P","P","S","S","W","Ch","Br","Cr","Dr","Bl","Cl","S"),
"I" => array("b","d","f","h","k","l","m","n","p","s","t","w","ch","st"),
"V" => array("a","e","i","o","u"),
"M" => array("ving","zzle","ndle","ddle","ller","rring","tting","nning","ssle","mmer","bber","bble","nger","nner","sh","ffing","nder","pper","mmle","lly","bling","nkin","dge","ckle","ggle","mble","ckle","rry"),
"F" => array("t","ck","tch","d","g","n","t","t","ck","tch","dge","re","rk","dge","re","ne","dging"),
"O" => array("Small","Snod","Bard","Billing","Black","Shake","Tilling","Good","Worthing","Blythe","Green","Duck","Pitt","Grand","Brook","Blather","Bun","Buzz","Clay","Fan","Dart","Grim","Honey","Light","Murd","Nickle","Pick","Pock","Trot","Toot","Turvey"),
"E" => array("shaw","man","stone","son","ham","gold","banks","foot","worth","way","hall","dock","ford","well","bury","stock","field","lock","dale","water","hood","ridge","ville","spear","forth","will"),
"G" => array("Albert","Alice","Angus","Archie","Augustus","Barnaby","Basil","Beatrice","Betsy","Caroline","Cedric","Charles","Charlotte","Clara","Cornelius","Cyril","David","Doris","Ebenezer","Edward","Edwin","Eliza","Emma","Ernest","Esther","Eugene","Fanny","Frederick","George","Graham","Hamilton","Hannah","Hedda","Henry","Hugh","Ian","Isabella","Jack","James","Jarvis","Jenny","John","Lillian","Lydia","Martha","Martin","Matilda","Molly","Nathaniel","Nell","Nicholas","Nigel","Oliver","Phineas","Phoebe","Phyllis","Polly","Priscilla","Rebecca","Reuben","Samuel","Sidney","Simon","Sophie","Thomas","Walter","Wesley","William"),
));
Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: