Results 1 to 12 of 12

Thread: Browse and check Links

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    4

    Browse and check Links

    Here is my problem. I am making a program which will check links. The HTML code for the link checker is

    HTML Code:
    <HTML>
    <head>
    <title>Rapidshare Link Checker </title>
    <style>
    body 
    {
    	background:black;
    }
    
    TABLE
    {
    	font-size: 8pt;
    	font-family: Verdana, tahoma, sans-serif;
    }
    
    .butt
    {
        BORDER-BOTTOM: black 1px solid;
        BORDER-LEFT: black 1px solid;
        BORDER-RIGHT: black 1px solid;
        BORDER-TOP: black 1px solid;
        CURSOR: hand	;
        FONT-FAMILY: tahoma,sans-serif;
        FONT-SIZE: 13px;
    	FONT-weighT: BOLD;
    	TEXT-DECORATION: none;
        WIDTH: 100px
    }
    .textarea
    {
    	COLOR: black;
        FONT: 8pt Verdana,Arial,Helvetica,Sans Serif;
    }
    p
    {
    	COLOR: gray;
        FONT: 8pt Verdana,Arial,Helvetica,Sans Serif;
        TEXT-DECORATION: none
    }
    h1
    {
    	COLOR: gray;
        FONT: 14pt Verdana,Arial,Helvetica,Sans Serif;
    }
    
    </style>
    </head>
    <BODY>
    <center>
    <form action="http://rapidshare.com/cgi-bin/checkfiles.cgi" method="post">
    <h1>Rapidshare Link Checker </h1>
    <br>
    <table >
    	<tr>
    		<td align="center">
    			<b>Enter only rapidshare links in the below Text field</b>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<textarea name="urls" rows="10" cols="100" class="textarea">
    			</textarea>
    		</td>
    	</tr>
    </table>
    <center><input type="submit" class="butt" value="Check Links"/></center>
    <pre>
    <p>
    Rapidshare searches for the file ids on all RS Servers, if it finds the files on any of the server u will get a file found 
    information regarding the server on which the file located. This will be highlighted with green font at the bottom of the page.
    If  it doesnt find the files on any server i.e. if the links are dead then u will get a file not found information with Red font
    </p>
    <pre>
    <br><br>
    </form>
    </font>
    </BODY>
    </HTML>
    (the direct link of the link checker page is
    " http://rapidshare.com/checkfiles.html "



    Now, what I want to do is that when I open a list of text files (with links) then the program checks those links and replies with either they are working or not. Here is the code to open the text file (of links)

    Code:
    Public Class form1
    
    
        Private Sub btnbrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbrowse.Click
            Dim dialog1 As New OpenFileDialog
            Dim resource1 As DialogResult
            Dim index As ListViewItem
            resource1 = browse.ShowDialog()
            If resource1 = DialogResult.OK Then
                txtfile.Text = browse.FileName
                GetFile(txtfile.Text)
               
            End If
        End Sub
    Using the above code I am able to get a list of links from a text file. Now what I want to do is, that the progam checks those links and gives the output if they still work or not.


    And is it possible without using the web borwser??

    Thanks!!!

  2. #2
    Lively Member
    Join Date
    Mar 2009
    Posts
    72

    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. "

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    4

    Re: Browse and check Links

    Quote Originally Posted by iam_clint View Post
    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?

  4. #4
    Lively Member
    Join Date
    Mar 2009
    Posts
    72

    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
    Last edited by iam_clint; Jun 4th, 2009 at 10:23 AM.

  5. #5
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    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

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    4

    Re: Browse and check Links

    THANKS FOR YOUR QUICK REPLIES!!!!

    Quote Originally Posted by iam_clint View Post
    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
    You don't need the WebBrowser control to check a URL: http://www.vb-helper.com/howto_net_validate_url.html
    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?

  7. #7
    Lively Member
    Join Date
    Mar 2009
    Posts
    72

    Re: Browse and check Links

    Quote Originally Posted by nmadd View Post
    You don't need the WebBrowser control to check a URL: http://www.vb-helper.com/howto_net_validate_url.html
    Its not validating the url... rapidshare handles all requests and will return a normal code with a custom error handling page.
    Last edited by iam_clint; Jun 4th, 2009 at 11:01 AM.

  8. #8
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Browse and check Links

    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

  9. #9
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: Browse and check Links

    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 View Post
    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.

  10. #10

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    4

    Re: Browse and check Links

    Quote Originally Posted by nmadd View Post
    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

  11. #11
    Lively Member
    Join Date
    Mar 2009
    Posts
    72

    Re: Browse and check Links

    Quote Originally Posted by nmadd View Post
    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.

  12. #12
    Lively Member
    Join Date
    Mar 2009
    Posts
    72

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width