Re: Browse and check Links
you can use an http web request and parse the response looking for something like "The file could not be found. Please check the download link. "
Re: Browse and check Links
Quote:
Originally Posted by
iam_clint
you can use an http web request and parse the response looking for something like "The file could not be found. Please check the download link. "
then I will have to add a webbrowser right?
Re: Browse and check Links
No web browser.. use a xmlhttp request
Or use their api... HTTP Watch on the ajax request from http://rapidshare.com/checkfiles.html
Send
Code:
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=72635215,72635215,72635215&filenames=filename.zip,filename.zip,filename.zip
Response
Code:
72635215,filename.zip,0,0,0,0,0
72635215,filename.zip,0,0,0,0,0
72635215,filename.zip,0,0,0,0,0
I am assuming the 0's mean it doesn't exist on any of their servers?
Send
Code:
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=174697554&filenames=BLEACH_MOVIE.part01.rar
Response
Code:
174697554,BLEACH_MOVIE.part01.rar,100431872,435,1,cg,0
435 is the server number in this case.. don't know what the other number represent. but in any case this should get you started
See: http://www.worldofasp.net/tut/WebReq...SPNET_114.aspx
Re: Browse and check Links
You don't need the WebBrowser control to check a URL: http://www.vb-helper.com/howto_net_validate_url.html
Re: Browse and check Links
THANKS FOR YOUR QUICK REPLIES!!!!
Quote:
Originally Posted by
iam_clint
No web browser.. use a xmlhttp request
Or use their api... HTTP Watch on the ajax request from
http://rapidshare.com/checkfiles.html
Send
Code:
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=72635215,72635215,72635215&filenames=filename.zip,filename.zip,filename.zip
Response
Code:
72635215,filename.zip,0,0,0,0,0
72635215,filename.zip,0,0,0,0,0
72635215,filename.zip,0,0,0,0,0
I am assuming the 0's mean it doesn't exist on any of their servers?
Send
Code:
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=174697554&filenames=BLEACH_MOVIE.part01.rar
Response
Code:
174697554,BLEACH_MOVIE.part01.rar,100431872,435,1,cg,0
435 is the server number in this case.. don't know what the other number represent. but in any case this should get you started
See:
http://www.worldofasp.net/tut/WebReq...SPNET_114.aspx
The server id of each file is different. So I guess it wont work
Quote:
Originally Posted by nmadd
Thanks. But how do I check multiple files??
Can anyone of you give me your msn so that I can send you the application and you may see how can I implement this link checker.
Thanks
btw, why isnt there a PM on this site?
Re: Browse and check Links
Quote:
Originally Posted by
nmadd
Its not validating the url... rapidshare handles all requests and will return a normal code with a custom error handling page.
Re: Browse and check Links
Quote:
btw, why isnt there a PM on this site?
If you mean private message you can do this by clicking the user's name to the left of the post and select "Send a private message".
If you mean project manager - there is;)
Re: Browse and check Links
Quote:
Can anyone of you give me your msn so that I can send you the application and you may see how can I implement this link checker.
Thanks
btw, why isnt there a PM on this site?
If you get help via PM or MSN, that means that nobody else will be able to read your thread and get any help if they have the same question in the future.
Quote:
Originally Posted by
iam_clint
Its not validating the url... rapidshare handles all requests and will return a normal code with a custom error handling page.
What do you mean? If it returns false then that means you got a 404 response, the name couldn't be resolved, etc; i.e. the URL isn't valid.
Re: Browse and check Links
Quote:
Originally Posted by
nmadd
If you get help via PM or MSN, that means that nobody else will be able to read your thread and get any help if they have the same question in the future.
yes, but I cant post the source in public can I ;)
Re: Browse and check Links
Quote:
Originally Posted by
nmadd
If you get help via PM or MSN, that means that nobody else will be able to read your thread and get any help if they have the same question in the future.
What do you mean? If it returns false then that means you got a 404 response, the name couldn't be resolved, etc; i.e. the URL isn't valid.
EggSample
http://rapidshare.com/files/filename.zip
Responses are all 200.. the file doesn't exist the code handles the request and outputs a custom error page saying the file doesn't exist.
Code:
00:00:00.000 RapidShare: Easy Filehosting
+ 0.000 0.306 691 1697 GET 200 text/html; charset=ISO-8859-1 http://rapidshare.com/files/filename.zip
+ 0.312 0.337 444 1654 GET 200 text/css http://rapidshare.com/img2/styles.css
+ 0.654 0.341 445 628 GET 200 image/gif http://rapidshare.com/img2/menu_bg.gif
+ 0.656 0.489 444 4162 GET 200 image/gif http://rapidshare.com/img2/rslogo.gif
+ 0.659 0.663 443 961 GET 200 image/jpeg http://rapidshare.com/img2/pfeil.jpg
1.322 2467 9102 5 requests
So in this case your check for a 404 will not work. Files aren't downloaded directly because you put in .zip at the end the code still handles the request and determines if you can download it.
Re: Browse and check Links
Code:
subroutine=checkfiles_v1
Description: Gets status details about a list of given files. (files parameter limited to 10000 bytes. filenames parameter limited to 100000 bytes.)
Parameters: files=comma separated list of file ids
filenames=comma separated list of the respective filename. Example: files=50444381,50444382 filenames=test1.rar,test2.rar
incmd5=if set to 1, field 7 is the hex-md5 of the file. This will double your points! If not given, all md5 values will be 0
Reply fields: 1:File ID
2:Filename
3:Size (in bytes. If size is 0, this file does not exist.)
4:Server ID
5:Status integer, which can have the following values:
0=File not found
1=File OK (Downloading possible without any logging)
2=File OK (TrafficShare direct download without any logging)
3=Server down
4=File marked as illegal
5=Anonymous file locked, because it has more than 10 downloads already
6=File OK (TrafficShare direct download with enabled logging. Read our privacy policy to see what is logged.)
6:Short host (Use the short host to get the best download mirror: http://rs$serverid$shorthost.rapidshare.com/files/$fileid/$filename)
7:md5 (See parameter incmd5 in parameter description above.)
Reply format: integer,string,integer,integer,integer,string,string
FULL API: http://images.rapidshare.com/apidoc.txt