Any solution to use non-guessable links in a program?
I've been looking for a file hosting site to host my files and my friend offered me a premium account on Box.net.
The problem in this host site (and on many others) is that the links arent guessable, they cant be predicted. That means: If you upload 2 images called "1.jpg" and "2.jpg", the links aren't like
"www.ho开发者_如何转开发st.com/omar/1.jpg , www.host.com/omar/2.jpg" ,
instead, they are like
"www.host.com/qweqwasd , www.host.com/123lqqwje" ..
So I cant use them on my application since I upload a lot of small site and I cant copy each link manually, it will take days.
Is there a way to override this problem in a program? maybe run a script to get all the links on the site?
When you upload a file, presumably the page shown afterwards gives the link - so just parse that page and extract the link from it.
Just think about how you'd get the link if you were a human, and do the same thing in code. (I assume you're already performing the upload in code.)
Alternatively, use a different file hosting site, which lets you specify the filename.
精彩评论