Chris M 55 Posted December 8, 2014 Report Share Posted December 8, 2014 I have a bot that creates automatic bit.ly urls on the fly. The only problem is the amount of time it takes to create and scrape them in large quantities. Does anyone have code that deals with Bit.ly and is quick to create / scrape? Haven't been able to figure out multi-threading so that may be an option. Just curious is someone has a super fast code already? Quote Link to post Share on other sites
giganut 109 Posted December 8, 2014 Report Share Posted December 8, 2014 I stoped using bit.ly a few years ago and switch to http://yourls.org/ to prevent bans and other bad this from happeing. I don't have a code for that, but just thought I would through that out there. Quote Link to post Share on other sites
Chris M 55 Posted December 8, 2014 Author Report Share Posted December 8, 2014 There is a reason I use bit.ly.I'm not doing it for redirection. Anyone? 1 Quote Link to post Share on other sites
UBotDev 276 Posted December 9, 2014 Report Share Posted December 9, 2014 Bit.ly has an API, why wouldn't you use that? Here is a simple example (remember to add your login and API key instead of ***): define $BITLY SHORTEN URL(#DEF URL) { return($trim($read file("http://api.bitly.com/v3/shorten?login=***&apiKey=***&longUrl={$plugin function("SocketCommands.dll", "$url encode", #DEF URL)}&format=txt"))) } 2 Quote Link to post Share on other sites
Chris M 55 Posted December 10, 2014 Author Report Share Posted December 10, 2014 Never learned how to do that but I'll check that out. Thanks UBotDev Quote Link to post Share on other sites
Chris M 55 Posted December 10, 2014 Author Report Share Posted December 10, 2014 That was exactly what I needed! Thanks man! Cheers. Quote Link to post Share on other sites
gavind 6 Posted December 10, 2014 Report Share Posted December 10, 2014 I think Bit.ly has tons of traffic going to their servers daily. Could that be a factor for the delay? Quote Link to post Share on other sites
Chris M 55 Posted December 11, 2014 Author Report Share Posted December 11, 2014 The API is fast Quote Link to post Share on other sites
UBotDev 276 Posted December 11, 2014 Report Share Posted December 11, 2014 Great to hear that works for you. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.