SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 17th, 2003, 12:04 PM
freefly freefly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 7 freefly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 5 sec
Reputation Power: 0
ASP forum question

I wonder how to detect the URL of a post in the forum.
detect "http://" ?
but some URLs do not appear as this type.

Can someone help me?

Reply With Quote
  #2  
Old July 17th, 2003, 01:24 PM
lordkyl lordkyl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 27 lordkyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have no idea what you mean...can you re-phrase the question? Which forum? What URL?

Reply With Quote
  #3  
Old July 17th, 2003, 01:32 PM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
are you talking about using a virtual directive as opposed to using a absolute directive? as in....

Server.MapPath Request.ServerVariables("PATH_INFO")
Returns: c:\inetpub\wwwroot\sub\me.asp
i.e. of the current file

Server.MapPath "\"
Returns: c:\inetpub\wwwroot
i.e. of the virtual root

that will get you the absolute from virtual if you mean some appear like that on your computer....
I really have no idea what you're asking....

Reply With Quote
  #4  
Old July 18th, 2003, 12:53 AM
Agarash Agarash is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: South Africa
Posts: 53 Agarash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 35 sec
Reputation Power: 6
always wanted to know that, thanks

Reply With Quote
  #5  
Old July 18th, 2003, 06:53 AM
freefly freefly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 7 freefly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 5 sec
Reputation Power: 0
Actually, I am talking about the function provided in this forum.

"Automatically parse URLs: automatically adds and around internet addresses. "

I have no idea about that.

Reply With Quote
  #6  
Old July 18th, 2003, 07:25 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
The magic of ASP is that as the client we can't see what the server is doing, sorry can't help you, only speculate. They're either doing regular expressions to check to see if http:// exists in the box, or if an ftp:// exists, and maybe even a www. words followed by a .com, it's really that simple, and then when if finds it, RegEx returns the indices of where it finds matches, so you can just insert a and then after the word ends have a tag and then that's how this forum interprets url links. If you want to do it on your forum or somthing, you'd have to add <a href=" blah" >text entered</a> around it to be interpreted by html.

Reply With Quote
  #7  
Old July 18th, 2003, 07:27 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
damnit, it's interpreting for me.. ok, there was supposed to be {url] tags and stuff in there but they were interpreted (duh) and some with the http://, notice it made it a link automatically, go php go! I don't think PHP has RegEx object, their probably doing strait up regular expressions, but since this is an asp form, i assume you're looking for how to do it in ASP

Reply With Quote
  #8  
Old July 18th, 2003, 09:36 AM
freefly freefly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 7 freefly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 5 sec
Reputation Power: 0
Nice. Good to hear what you said, but that's means I need to check every possible URL? (e.g. http:// , www. , .com, .html, .js )
There are so many combinations!

Thanks for your reply.

Reply With Quote
  #9  
Old July 18th, 2003, 09:39 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
hahaha, ummm... no, not a good idea.. Just start from the indicies of finding http:// or www. (also make sure you don't double that, so if it's www, make sure the preceding character is NOT a / otherwise it will be a double link and all messed up) so where was i?
thoughts.pop()
from http:// from there on till you find a space, then throw in the ending of the tag once you get to a space

=D

Reply With Quote
  #10  
Old July 18th, 2003, 09:43 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
also, notice forums.devshed.com/blah

you can't do the.com checks and things like that, what happens when you get to just forums.devshed.com, how is that delimited, you'll have to check for a space.

there might be a sneakier way of declaring something html based or something like that, i'm not sure....

Reply With Quote
  #11  
Old July 18th, 2003, 11:29 PM
freefly freefly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 7 freefly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 5 sec
Reputation Power: 0
How about if the poster forget to put a space after the link or he type chinese character right after the link without any space?
ha.. can't imagine..

just like: www.abc.comtesting the link
www.abc.com¸ÕÅ礤

By the way, thanks for your kind reply.

Reply With Quote
  #12  
Old July 18th, 2003, 11:32 PM
freefly freefly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 7 freefly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 5 sec
Reputation Power: 0
Really! Here also test the presence of a space afterwards.

mms://abc.ram
ftp://abc.iz

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP forum question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway