Webmaster Forumu - Webmaster Zone

Geri git   Webmaster Forumu - Webmaster Zone > Webmaster Zone > Programlama Dilleri > CGI / Perl
Şifrenizimi Unuttunuz? Bize Katılın!

Cevapla
Görüntüleme: 1379 - Cevaplar: 0  
LinkBack Seçenekler Stil
  #1 (permalink)  
Alt 24-02-2007, 11:26:32
Alone - ait Kullanıcı Resmi (Avatar)
Alone Alone isimli üyemiz çevrimdışıdır. (Offline)
Zonekolik
No Status
 
Üyelik tarihi: 31/1/2007
Nerden: İstanbul
Mesajlar: 1.308
iTrader: (11)
Tecrübe Puanı: 79
Puanları: 953
Alone is just really niceAlone is just really niceAlone is just really niceAlone is just really niceAlone is just really nice
Standart Hava Durumu Gösterme

Kod:
<br>

#!/usr/bin/perl





use CGI::Carp qw(fatalsToBrowser);

use English;

use CGI;

use integer;

require LWP::UserAgent;

use GD;



$q = new CGI;

$ua = new LWP::UserAgent;

$city =$q->param(city);

$city =~ s/ı/i/g;

$city =~ s/İ/I/g;

$city =~ s/ğ/g/g;

$city =~ s/Ğ/G/g;

$city =~ s/ş/s/g;

$city =~ s/Ş/S/g;

$formil = $city;

$city =~ tr/[a-z]/[A-Z]/;

$begin = "http://www.meteor.gov.tr/pages/";

$data = $begin . $city.'.htm';

$lookup = new HTTP::Request 'GET', "$data";

$response = $ua->request($lookup);

@lines = split (/

/, $response->content);

foreach $item (@lines) {

chomp($item);

$tpl =$tpl.$item;

}

$start = '<!--BURADA BAŞLA-->';

$end = '<TD><div>Rüzgar</TD>';

($part1,$part2) = split(/<!--BURADA BAŞLA-->/,$tpl);

($part3,$part4) = split(/<TD><div>Rüzgar</TD>/,$part2);

($part5,$part6) = split(/<div>Hava Durumu</div>/,$part3);

($part7,$part8) = split(/<br>/,$part6);

($part9,$part10) = split(/</div>/,$part8);

($part11,$part12) = split(/<TD><div>Sıcaklık</div></TD>/,$part8);

($part13,$part14) = split(/<div>/,$part12);

($part15,$part16) = split(/</div>/,$part14);

$part9 =~ s/ı/i/g;

$part9 =~ s/ç/Ç/g;

$part9 =~ s/ğ/g/g;

$part9 =~ s/Ğ/G/g;

$part9 =~ s/ş/s/g;

$part9 =~ s/Ş/S/g;

$part9 =~ tr/[a-z]/[A-Z]/;

print "Content-type: image/png



";

$im = new GD::Image(100,50);

($white,$black,$red,$blue,$yellow) =

(

$im->colorAllocate(255, 255, 255),

$im->colorAllocate(0, 0, 0),

$im->colorAllocate(255, 0, 0),

$im->colorAllocate(0,0,255),

$im->colorAllocate(255,250,205)

);

$im->fill(50,50,$yellow);

$im->rectangle(1,1,99,49,$black);

$im->string(gdSmallFont,5,3,$formil."'da Hava",$black);

$im->string(gdSmallFont,5,17,$part9,$red);

$im->string(gdSmallFont,5,32,"SICAKLIK ".$part15,$blue);



binmode STDOUT;

print $im->png;

exit;
__________________
Kişiselite - Gitarist
Alıntı ile Cevapla
Cevapla



Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Hava Durumunu Bilen Şemsiye By.AdSL Teknoloji & Bilişim 0 05-09-2007 00:03:54
Yunan Hava Kuvvetleri Plus GeyOS 6 14-07-2007 12:12:16
Hava Durumu scripti Gizlen Script / Veritabanı ( Database ) 0 11-04-2007 16:51:58
Sitemin MetaTag durumu nedir? Cevabı burada. üye Arama Motoru Optimizasyonu 2 01-02-2007 17:21:55
Sunucu durumu ? DEKAN Webmaster Genel 3 07-01-2007 18:00:37


oyun , kontör , türkçe dizin

Bütün Zaman Ayarları WEZ +2 olarak düzenlenmiştir. Şu Anki Saat: 19:24:18 .


Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
Zone Org | 2006-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125