Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
11-30-2011, 09:38 AM | #1 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
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. |
11-30-2011, 09:42 AM | #2 |
So Fucking Banned
Industry Role:
Join Date: Feb 2006
Posts: 23,783
|
|
11-30-2011, 09:44 AM | #3 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,920
|
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. WP Tube Themes |
11-30-2011, 10:03 AM | #4 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
impossible as far as i am aware
__________________
hatisblack at yahoo.com |
11-30-2011, 10:10 AM | #5 |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
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 |
11-30-2011, 10:12 AM | #6 | |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
Quote:
|
|
11-30-2011, 10:22 AM | #7 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
btw .. why not just use php ?
__________________
hatisblack at yahoo.com |
11-30-2011, 10:40 AM | #8 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
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.
|
11-30-2011, 10:44 AM | #9 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
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 |
11-30-2011, 10:54 AM | #10 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
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). |
11-30-2011, 10:57 AM | #11 |
So Fucking Banned
Industry Role:
Join Date: Aug 2011
Location: Les Alpes, France
Posts: 1,423
|
Use php for this. Use Java scripts for things it's intended for.
|
11-30-2011, 11:32 AM | #12 |
Bollocks
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
|
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 |
11-30-2011, 11:47 AM | #13 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
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.
__________________
|
11-30-2011, 11:58 AM | #14 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,920
|
or use javascript with php using ajax
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. WP Tube Themes |
11-30-2011, 12:21 PM | #15 |
Registered User
Industry Role:
Join Date: Sep 2010
Posts: 54
|
its possible using an ajax call but i dont recommend it cause you will collapse the surfer memory
|
12-03-2011, 08:50 PM | #16 |
Confirmed User
Join Date: Nov 2008
Posts: 317
|
js doesn't have the ability to do it on it's own, you'll need php to make the cross domain request.
|
12-03-2011, 10:27 PM | #17 | |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
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 |
|
12-03-2011, 11:00 PM | #18 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,359
|
|
12-03-2011, 11:03 PM | #19 |
So Fucking Banned
Industry Role:
Join Date: Apr 2009
Posts: 2,968
|
hidden frame?
|