JavaScript to validate reciprocal links.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cyber Fucker
    Hmm
    • Sep 2005
    • 12642

    #1

    JavaScript to validate reciprocal links.

    Does anyone have anything like that?
    I need not server-side but client-side script to check reciprocal links / backlinks.
    I have been searching for it for a while in Google but I couldn't find. There is plenty but curl or php.
    I found some XMLHTTP but I'm still looking for something better.

  • CyberHustler
    Masterbaiter
    • Feb 2006
    • 28724

    #2
    I've been using this: http://www.webconfs.com/reciprocal-link-checker.php

    Not the same, but works
    “If you can convince the lowest white man he’s better than the best colored man, he won’t notice you’re picking his pocket. Hell, give him somebody to look down on, and he’ll empty his pockets for you.”

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      you need server side, not client. i dont think its possible to do with javascript alone.
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • SmokeyTheBear
        ►SouthOfHeaven
        • Jun 2004
        • 28609

        #4
        impossible as far as i am aware
        hatisblack at yahoo.com

        Comment

        • raymor
          Confirmed User
          • Oct 2002
          • 3745

          #5
          It's certainly possible. You can put a javascript: url into a bookmark and run it by clicking the button in your bookmarks bar. I use some Javascript which finds links and does some checking on rhe format if the links. You could then pass the url directly to xmlhttprequest or make it easier by using jquery. You've then pass the response back through your link parsing routine to check for the reciprocal link.
          For historical display only. This information is not current:
          support@bettercgi.com ICQ 7208627
          Strongbox - The next generation in site security
          Throttlebox - The next generation in bandwidth control
          Clonebox - Backup and disaster recovery on steroids

          Comment

          • Cyber Fucker
            Hmm
            • Sep 2005
            • 12642

            #6
            Originally posted by raymor
            It's certainly possible. You can put a javascript: url into a bookmark and run it by clicking the button in your bookmarks bar. I use some Javascript which finds links and does some checking on rhe format if the links. You could then pass the url directly to xmlhttprequest or make it easier by using jquery. You've then pass the response back through your link parsing routine to check for the reciprocal link.
            Interesting approach... however, it cannot use browser bookmarks... I'm building a tool that will be on a website, and many users will be using it. I would like to offload my server though, if the queries may be done on client-side then there is no reason for me to rip my own server which can also lead to blocking its IPs within various places and abuse. If I will not find a proper client-side solution that could be combined into the website I will have to put it on some external VPS cause I cannot afford any problems with the main server.
            Last edited by Cyber Fucker; 11-30-2011, 08:26 AM.

            Comment

            • SmokeyTheBear
              ►SouthOfHeaven
              • Jun 2004
              • 28609

              #7
              btw .. why not just use php ?
              hatisblack at yahoo.com

              Comment

              • Cyber Fucker
                Hmm
                • Sep 2005
                • 12642

                #8
                If it was only for myself then yes, php/curl is the way, but it's for hundreds of other folks, so, it makes a difference. If it could be done on client-side then why rip the server, in the end the final results would be the same, backlinks are either valid or not.

                Comment

                • SmokeyTheBear
                  ►SouthOfHeaven
                  • Jun 2004
                  • 28609

                  #9
                  why dont you explain a bit more about what you are trying to do, there may be better ways to approach the same idea.
                  hatisblack at yahoo.com

                  Comment

                  • Cyber Fucker
                    Hmm
                    • Sep 2005
                    • 12642

                    #10
                    Uh, oh I think there is not much more to explain than I already explained. I just need a function that will validate backlink status.

                    For example here is a php script sample to validate reciprocal link, I don't even know if it works or not but let's presume that it works:

                    Code:
                    $linkAction = $_POST['action'];
                    $recip_url= $_POST['recip_url'];
                    
                    if($lnkAction == '1' && isset($recip_url))
                    	{
                    		$this_url = 'http://www.my_url.com';
                    		
                    		$recip_url = $recip_url;
                    		
                    		$source = fopen($recip_url, 'r');
                    		
                    		$contents = stream_get_contents($source);
                    		
                    		if(stristr($contents, $this_url)) {
                    			echo '0';
                    		} else {
                    			echo '1';
                    		}
                    		
                    		fclose($source);
                    	}

                    Now, I want to do the same thing but on a client-side preferably using JavaScript (JavaScript extensions like jQuery or Yui are also acceptable).

                    Comment

                    • EukerVoorn
                      So Fucking Banned
                      • Aug 2011
                      • 1423

                      #11
                      Use php for this. Use Java scripts for things it's intended for.

                      Comment

                      • redwhiteandblue
                        Bollocks
                        • Jun 2007
                        • 2793

                        #12
                        You're far better off using PHP and making use of the DOMDocument class for this, I'm not aware of anything in Javascript that will let you do what you want (happy to be proven wrong though).
                        Interserver unmanaged AMD Ryzen servers from $73.00

                        Comment

                        • Serge Litehead
                          Confirmed User
                          • Dec 2002
                          • 5190

                          #13
                          find js expert, js is so flexible and works beautifully with DOM, it should be able to load remote page and parse it element by element to see if there are link matches. resources wise can't tell what it could be like on client machines, one or two links could be fine, checking multiple backlinks might be noticeably hit on performance.

                          Comment

                          • fris
                            Too lazy to set a custom title
                            • Aug 2002
                            • 55679

                            #14
                            or use javascript with php using ajax
                            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                            Comment

                            • xcode
                              Registered User
                              • Sep 2010
                              • 54

                              #15
                              its possible using an ajax call but i dont recommend it cause you will collapse the surfer memory

                              Comment

                              • porndotnet
                                Confirmed User
                                • Nov 2008
                                • 317

                                #16
                                js doesn't have the ability to do it on it's own, you'll need php to make the cross domain request.

                                Comment

                                • raymor
                                  Confirmed User
                                  • Oct 2002
                                  • 3745

                                  #17
                                  Originally posted by Cyber Fucker
                                  Interesting approach... however, it cannot use browser bookmarks... I'm building a tool that will be on a website, and many users will be using it. I would like to offload my server though, if the queries may be done on client-side then there is no reason for me to rip my own server which can also lead to blocking its IPs within various places and abuse. If I will not find a proper client-side solution that could be combined into the website I will have to put it on some external VPS cause I cannot afford any problems with the main server.
                                  The same script can be attached to a button on a page. Within a page, you do run into cross domain restrictions. You can deal with that by proxying through the origin server, or using yql:
                                  http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

                                  Javascript can also be divorced from cross domain restrictions by being packaged as a Firefox addon.

                                  That's going to be the challenging part about JavaScript - working around cross domain restrictions in some way. Doing it server side would be easier certainly.

                                  Being worried about your main server being blocked due to too many requests, a small VPS might be reasonable. If you expect a large volume of users, but want to minimize the hardware requirements, code written in C will handle roughly 150 times as much traffic on the same hardware compared to PHP. Perl is roughly three times as fast as PHP, and still so similar that a lot of code is both valid Perl and valid PHP. So if you were going to do it server side, just changing a few lines to make it Perl rather than PHP triples your throughout or so:

                                  http://xodian.net/serendipity/index....-vs.-Ruby.html
                                  Last edited by raymor; 12-03-2011, 08:28 PM.
                                  For historical display only. This information is not current:
                                  support@bettercgi.com ICQ 7208627
                                  Strongbox - The next generation in site security
                                  Throttlebox - The next generation in bandwidth control
                                  Clonebox - Backup and disaster recovery on steroids

                                  Comment

                                  • V_RocKs
                                    Damn Right I Kiss Ass!
                                    • Nov 2003
                                    • 32447

                                    #18
                                    Originally posted by fris
                                    or use javascript with php using ajax
                                    ftw............

                                    Comment

                                    • cam_girls
                                      So Fucking Banned
                                      • Apr 2009
                                      • 2968

                                      #19
                                      hidden frame?

                                      Comment

                                      Working...