prl kodları
Döviz Kurunu öğrenme
$doviz= get("http://www.tcmb.gov.tr/kurlar/today.html");
$doviz=~ s/\s+/\|/g;
($d1$d2)=split(/USD\|\w+\|\w+\|\w+\|/$doviz);
($d_alis$d_satis)=split(/\|/$d2);
($e1$e2)=split(/EUR\|\w+\|\w+\|/$doviz);
($e_alis$e_satis)=split(/\|/$e2);
print qq~
<table border=0 width=100%>
<tr align=center>
<td></td><td>ALIŞ</td><td>SATIŞ</td>
</tr>
<tr>
<td width=50><font color="#FCAA84" size="2">DOLAR</font></td>
<td width=70>$d_alis</td>
<td width=70>$d_satis</td>
</tr>
<tr>
<td><font color="#93C5EA" size="2">EURO</font></td>
<td>$e_alis</td><td>$e_satis</td>
</tr>
</table>
~;
AÇIKLAMA: Bu kodları not defterine aynen kopyalayarak doviz.pl adı ile kaydedin ve açın. Bu kodların çalışabilmesi için internete bağlı olmanız gerekir. Çünkü bilgiler TCMB sitesinden alınmaktadır. Hepsi bu .
> Yazar: WebMaster
> Mail : [email protected]
> Site : www.bestwow.com.tr.tc
Ziyaretçi sayısını öğrenme
#!/usr/bin/perl
$sfark = 10; #server ile saat farkını yazınız.
$ek = $ENV{'QUERY_STRING'};
$ek =~ s/\+/ /g;
$ref = substr($ek4);
$ref =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C"hex($1))/ge;
$ref = "BM" if ($ref eq "" || $ref eq "undefined");
$ip = $ENV{'REMOTE_ADDR'};
$browser = $ENV{'HTTP_USER_AGENT'};
$tarih = time + $sfark * 3600;
@tar = localtime($tarih);
$tar[4]++;
$tar[5]+=1900;
$tarih = "$tar[3]-$tar[4]-$tar[5].txt";
$tar[0]="0$tar[0]" if ($tar[0]<10);
$tar[1]="0$tar[1]" if ($tar[1]<10);
$tar[2]="0$tar[2]" if ($tar[2]<10);
$saat="$tar[2]:$tar[1]:$tar[0]";
open (DOSYA ">>data/$tarih");
print DOSYA "$saat|$ref|$ip|$browser\n";
close(DOSYA);
open(DOSYA "sayac.txt");
$sayac = <DOSYA>;
close(DOSYA);
$sayac++;
open(DOSYA ">sayac.txt");
print DOSYA $sayac;
close(DOSYA);
@digits = (
"3c 66 66 66 66 66 66 66 66 3c"
"30 38 30 30 30 30 30 30 30 30"
"3c[IMG]chrome://skype_ff_toolbar_win/content/space.gif[/IMG][IMG]chrome://skype_ff_toolbar_win/content/space.gif[/IMG][IMG]chrome://skype_ff_toolbar_win/content/space.gif[/IMG][IMG]chrome://skype_ff_toolbar_win/content/space.gif[/IMG][IMG]chrome://skype_ff_toolbar_win/content/space.gif[/IMG]66 60 60 30 18[IMG]chrome://skype_ff_toolbar_win/content/cb_transparent_r.gif[/IMG] 0c 06 06 7e"
"3c 66 60 60 38 60 60 60 66 3c"
"30 30 38 38 34 34 32 7e 30 78"
"7e 06 06 06 3e 60 60 60 66 3c"
"38 0c 06 06 3e 66 66 66 66 3c"
"7e 66 60 60 30 30 18 18 0c 0c"
"3c 66 66 66 3c 66 66 66 66 3c"
"3c 66 66 66 66 7c 60 60 30 1c");
@bytes = ();
$len = length($sayac);
$formattedCount = sprintf("%0${len}d"$sayac);
for ($y=0; $y < 10; $y++){
for ($x=0; $x < $len; $x++){
$digit = substr($formattedCount$x1);
$byte = substr(@digits[$digit]$y*32);
push(@bytes$byte);
}
}
print ("Content-type: image/x-xbitmap\n\n");
printf ("#define count_width %d\n#define count_height 10\n"$len*;
printf STDOUT "static char count_bits[] = {\n";
for($i = 0; $i < ($#bytes + 1); $i++) {
print("0x$bytes[$i]");
if ($i != $#bytes) {
print("");
if (($i+1) % 7 == 0) {
print("\n");
}
}
}
print("};\n");
AÇIKLAMA: Bu kodları not defterine aynen kopyalayarak sayac.pl adı ile kaydedin ve açın. Hepsi bu .
> Yazar: WebMaster
Alıntıdır