![]() |
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. :helpme |
|
you need server side, not client. i dont think its possible to do with javascript alone.
|
impossible as far as i am aware
|
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.
|
Quote:
|
btw .. why not just use php ?
|
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. :)
|
why dont you explain a bit more about what you are trying to do, there may be better ways to approach the same idea.
|
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']; 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). :helpme |
Use php for this. Use Java scripts for things it's intended for.
|
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).
|
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.
|
or use javascript with php using ajax
|
its possible using an ajax call but i dont recommend it cause you will collapse the surfer memory
|
js doesn't have the ability to do it on it's own, you'll need php to make the cross domain request.
|
Quote:
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 |
Quote:
|
hidden frame?
|
All times are GMT -7. The time now is 06:58 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc