Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Link Test
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Link Test

 Post Reply Post Reply
Author
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Topic: Link Test
    Posted: 20 October 2003 at 5:23am
I detect a fair amount of brain power on these forums so maybe someone can help me.  Let's say I provide a way for members to submit a link to another site. The question: how can i automatically validate that the URL is good and a not a 404?  If good. accept for later approval, if bad, tell the submitter.
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 5:33am
Use XMLHttp to try to load the entered URL... it "knows" if the request is good or bad
Contribute to the working anarchy we fondly call the Internet
Back to Top
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 7:01am
thanks for the tip but i'm really looking for a more portable, browser independent solution.  could be wrong, but i believe xmlhttp is an activex object for IE 5+. 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 7:07am
The XMLHttp object can be used server side in ASP.

You can use it to grab data from another file and then parse it yourself in ASP.

Or in your case use it to see if the URL is good, if nothing is returned then the page doen't exsist and the object will through up an exception error.

I use it on this site to get meta tags on the search engine submission page at:-

http://www.webwiz.net/web_design/search_engine_submiss ion/submission_service.asp

It browser indpendent as the XMLHttp object is running on the server.
Back to Top
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 7:51am

thanks MorningZ and -boRg-.

never seen the server side reference.  looks like i have a little r & d to do.

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 12:00pm

Referencing this article on 4guysfromrolla.com, i turned out this simple example for you to build on if you want using XMLHttp

cheers

Contribute to the working anarchy we fondly call the Internet
Back to Top
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 12:58pm

it's ugly, it's rude, it's crude.  the send method on a 404 has given me a headache but i got it and a 200 working. 200's are your friend.

thanks again for your help.

time for my nap.

 

Back to Top
ctscott View Drop Down
Senior Member
Senior Member


Joined: 27 May 2003
Location: United States
Status: Offline
Points: 246
Post Options Post Options   Thanks (0) Thanks(0)   Quote ctscott Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 12:59pm
Originally posted by MorningZ MorningZ wrote:

Referencing this article on 4guysfromrolla.com, i turned out this simple example for you to build on if you want using XMLHttp

cheers

i should clicked on refresh an hour ago so i wouldn't need a nap. i ended up figuring it out the hard way.   

edit: your example is a little cleaner than mine. thanks mz.



Edited by ctscott
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.