IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  vaybe sohbet

>
+
Etiketlenen Kullanıcılar

10Beğeni(ler)
  • 3 Post By saywhat
  • 1 Post By saywhat
  • 1 Post By saywhat
  • 3 Post By saywhat
  • 1 Post By saywhat
  • 1 Post By saywhat

 
 
LinkBack Seçenekler Stil
Prev önceki Mesaj   sonraki Mesaj Next
Alt 13 Ekim 2014, 08:57   #5
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: shorten ( link kısaltma ) Tcl




güncelleme yapıldı. önceki yazımlarda görülen sorunlar giderildi...

( Tcl8.5.x ve üstü sürüm gerektirir. tcllib http ve htmlparse paketi gerektirir. https linkleri için tcl-tls paketi kurulmuş olması gerekir. )

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
if {[info tclversion] < 8.5} { putloglev o * "\00312Bu scripti kullanmak icin en az, Tcl8.5.x ve ustu Tcl surumlerinden biri kurulu olmali. Algilanan surum : $tcl_patchLevel\00312" } else { putloglev o * "\00312Algilanan Tcl surumu : $tcl_patchLevel shorten.tcl yuklendi. \ kanal ustunde aktif etmek icin :\003\00306 .chanset #kanal +shorten\003" } package require Tcl 8.5 namespace eval isgd { } package require http package require htmlparse if {![catch {package require tls}]} { ::http::register https 443 [list ::tls::socket -require 0 -request 1] set vartls "1" putlog "\00304Tls algilandi, https destegi olacak.\003" } else { set vartls "0" putlog "\00304Tls bulunamadi. https destegi olmayacak.\003" } setudef flag shorten bind pubm - "*" ::isgd::is_gd:pubm bind msgm - "*" ::isgd::is_gd:msgm proc ::isgd::is_gd:msgm {nick uhost hand text} { ::isgd::is_gd:main $nick $uhost $hand $nick $text } proc ::isgd::is_gd:pubm {nick uhost hand chan text} { if {![channel get $chan shorten]} { return 0 } ::isgd::is_gd:main $nick $uhost $hand $chan $text } proc ::isgd::is_gd:main {nick uhost hand chan text} { set output [::isgd::is_gd:output $text] set title [::isgd::is_gd:title $text] set cikti "" lappend cikti \00314 {*}$output \003\00304:\003\00306 {*}[::htmlparse::mapEscapes $title] \003 if {![info exists cikti] || [llength $output] < 1} { return } puthelp "privmsg $chan :\00309$nick\003 \00304->\003[filter $cikti]" return 0 } proc ::isgd::is_gd:output {text} { set veri [::isgd::check_txt $text] if {![info exists veri] || [llength $veri] < 1} { return } putlog " -> $veri" set isurl "http://is.gd/api.php?longurl=$veri" ::http::config -useragent "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)" set url [::http::geturl "$isurl" -timeout [expr {6*1000}]] set data [split [::http::data $url] \n] ::http::cleanup $url regexp {(.*)} $data "" output if {![info exists output] || [string match -nocase "*Error*Sorry*" $output]} { set output "hata oluştu..." return $output } else { return $output } } proc ::isgd::is_gd:title {text} { set veri [::isgd::check_txt $text] if {![info exists veri] || [llength $veri] < 1} { return } ::http::config -useragent "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)" set turl [::http::geturl $veri -timeout [expr {6*1000}]] set tdata [split [::http::data $turl] \n] ::http::cleanup $turl regexp {<title>(.*?)</title>} $tdata "" title if {![info exists title]} { set title "hata...bulunamadı..." return $title } else { return $title } } proc ::isgd::check_txt {text} { set t [stripcodes bcruag $text] foreach _ [split $t] { if {[regexp -nocase -- {(http|ftp|https|
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
out]} { return [lindex $out 0] } } } proc filter {text} { set text [string map {"\\" "\\\\" "\[" "\\\[" "\]" "\\\]" "\{" "\\\{" "\}" "\\\}" "\$" "\\\$" "\"" "\\\""} $text] return [subst $text] }


 
Alıntı ile Cevapla

 

Etiketler
eggdrop, is.gd, kısaltma, link, shorten, tcl


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

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

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


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Yolculukta Namazları Kısaltma Ve Birleştirme Elysian Genel İslami Konular 0 06 Mayıs 2014 17:57
Kısaltma sorunu :S TİGeR mIRC Scripting Sorunları 1 07 Aralık 2010 08:51
Tiny URL v2.0 Link kısaltma scripti Loft PHP 0 13 Ocak 2008 04:26