egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

URL Shortening Service

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Taek
Voice


Joined: 22 Jan 2010
Posts: 1

PostPosted: Fri Jan 22, 2010 12:29 am    Post subject: URL Shortening Service Reply with quote

Hi folks, i am completely new to TCL. I am trying to create a URL Shortening script for my eggdrop bot, but i don't understand how i can get the information from a website that returns just plain text.

Example: http://url.srv/api.php?url=http://www.example.com/some-path/to-dir/file.html

the return is just a simple url with no html formatting

http://url.srv/ABC123

how can get this this shortened url into a chat?

=================
I was thinking of maybe using the following but looking at the person's website and the way it returns the value doesn't add up to me.

Excerpt from another post by SL0RD
Code:

bind pub - !miut miut:trim

proc miut:trim { nick host hand chan text } {
        set url $text
        if {[catch {exec /usr/bin/curl -d url=$url http://miut.me/create.php?} result]} {
                puthelp "PRIVMSG $chan :Error!"
        } else {
                puthelp "PRIVMSG $chan :It worked!"
        }



Thanks in advance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber