Professional Web Design, Breathing Life and Beauty back into your Website

Beautifying Your Website

PHP Knowledge Needed

Webmaster Community

What does this code do? I know what it’s done, but what would you say the purpose of it is? I will post why I ask once I get some replies, all I will say is I can’t believe the audacity!


<?
$source=base64_decode('JWxpbmsxJTxpbWcgc3JjPSJodHRwOi8vd3d3LnRoZW1lc2Jhc2UuY29tL2ltZ2RvdC9kb3RfY2xl
YXIuZ2lmIj4gJWxpbmsyJQ==');

$s[1]=base64_decode('dGV4dHxodHRwOi8vd3d3LnRoZW1lc2Jhc2UuY29tfFRoZW1lc0RCfG1hbWJvIHRoZW1lKm1hbWJvIH
N0eWxlKm1hbWJvIHRlbXBsYXRlKm1hbWJvIHRoZW1lcyptYW1ibyBzdHlsZXMqbWFtYm8gdGVtcGxhdGVzKmpvb21sYSB0aGV
tZSpqb29tbGEgc3R5bGUqam9vbWxhIHRlbXBsYXRlKmpvb21sYSB0aGVtZXMqam9vbWxhIHN0eWxlcypqb29tbGEgdGVtcGxhd
GVzKnBocGJiIHRoZW1lKnBocGJiIHN0eWxlKnBocGJiIHRlbXBsYXRlKnBocGJiIHRoZW1lcypwaHBiYiBzdHlsZXMqcGhwYmIgdGVtcG
xhdGVzKnBocG51a2UgdGhlbWUqcGhwbnVrZSBzdHlsZSpwaHBudWtlIHRlbXBsYXRlKnBocG51a2UgdGhlbWVzKnBocG51a2Ugc3R
5bGVzKnBocG51a2UgdGVtcGxhdGVzKnBocC1mdXNpb24gdGhlbWUqcGhwLWZ1c2lvbiBzdHlsZSpwaHAtZnVzaW9uIHRlbXBsYXRlK
nBocC1mdXNpb24gdGhlbWVzKnBocC1mdXNpb24gc3R5bGVzKnBocC1mdXNpb24gdGVtcGxhdGVzKndvcmRwcmVzcyB0aGVtZSp3b
3JkcHJlc3Mgc3R5bGUqd29yZHByZXNzIHRlbXBsYXRlKndvcmRwcmVzcyB0aGVtZXMqd29yZHByZXNzIHN0eWxlcyp3b3JkcHJlc3Mgd
GVtcGxhdGVzKmUxMDcgdGhlbWUqZTEwNyBzdHlsZSplMTA3IHRlbXBsYXRlKmUxMDcgdGhlbWVzKmUxMDcgc3R5bGVzKmUxMDcgdG
VtcGxhdGVzKnhvb3BzIHRoZW1lKnhvb3BzIHN0eWxlKnhvb3BzIHRlbXBsYXRlKnhvb3BzIHRoZW1lcyp4b29wcyBzdHlsZXMqeG9vcHMg
dGVtcGxhdGVzKnZidWxsZXRpbiB0aGVtZSp2YnVsbGV0aW4gc3R5bGUqdmJ1bGxldGluIHRlbXBsYXRlKnZidWxsZXRpbiB0aGVtZXMqdm
J1bGxldGluIHN0eWxlcyp2YnVsbGV0aW4gdGVtcGxhdGVzfA==');$s[2]=base64_decode('dGV4dHxodHRwOi8vd3d3LmZsb3dlcnNjb21
wYXJlLmNvbXxGQ3xmbG93ZXIqZmxvd2VycypzZW5kIGZsb3dlcipzZW5kIGZsb3dlcnMqZmxvd2VyIGRlbGl2ZXJ5KmZsb3dlcnMgZGVsa
XZlcnkqZmxvcmlzdCpvbmxpbmUgZmxvcmlzdCpmbG93ZXJzIG9ubGluZXw=');

for($ss=1;$ss<=2;$ss++)
{
 $l=explode("\n",$s[$ss]);shuffle($l);

 $ll=explode('|',$l[0]);

 switch($ll[0]){
 case 'text':
  $anchors=explode('*',$ll[2]);
  $titles=explode('*',$ll[3]);
  $url=$ll[1];
  $link_source='<a href="'.$url.'" title="'.$titles[rand(0,sizeof($titles)-1)].'">'.$anchors[rand(0,sizeof($anchors)-1)].'</a>';
 break;
 case 'img':
  $url=$ll[1];
  $iurl=$ll[2];
  $alts=explode('*',$ll[3]);
  $link_source='<a href="'.$url.'"><img border="0" src="'.$iurl.'" alt="'.$alts[rand(0,sizeof($alts)-1)].'"></a>';
 break;
 default:break;
 }
 $source=eregi_replace('%link'.$ss.'%',$link_source,$source);
}

echo $source;

?>

2 Responses to “PHP Knowledge Needed”

  1. Shawn Hogan Says:

    It spews out 2 links and an image like so:

    link1 image link2

    link1 links to themesbase.com and has a random anchor text that could be one of: mambo theme, mambo style, mambo template, mambo themes, mambo styles, mambo templates, joomla theme, joomla style, joomla template, joomla themes, joomla styles, joomla templates, phpbb theme, phpbb style, phpbb template, phpbb themes, phpbb styles, phpbb templates, phpnuke theme, phpnuke style, phpnuke template, phpnuke themes, phpnuke styles, phpnuke templates, php-fusion theme, php-fusion style, php-fusion template, php-fusion themes, php-fusion styles, php-fusion templates, wordpress theme, wordpress style, wordpress template, wordpress themes, wordpress styles, wordpress templates, e107 theme, e107 style, e107 template, e107 themes, e107 styles, e107 templates, xoops theme, xoops style, xoops template, xoops themes, xoops styles, xoops templates, vbulletin theme, vbulletin style, vbulletin template, vbulletin themes, vbulletin styles, vbulletin templates

    the image is: <img src=”themesbase.com/imgdot/dot_clear.gif”>

    link2 links to flowerscompare.com and has a random anchor text that could be one of: flower, flowers, send flower, send flowers, flower delivery, flowers delivery, florist, online florist, flowers online

  2. Colleen Says:

    Wow, so it’s worse than I thought. Thanks for the explanation Shawn.

Leave a Reply