|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
I have no idea what you mean...can you re-phrase the question? Which forum? What URL?
|
|
#3
|
|||
|
|||
|
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.... |
|
#4
|
|||
|
|||
|
always wanted to know that, thanks
|
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
|||
|
|||
|
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
|
|
#8
|
|||
|
|||
|
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. |
|
#9
|
|||
|
|||
|
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 |
|
#10
|
|||
|
|||
|
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.... |
|
#11
|
|||
|
|||
|
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. |
|
#12
|
|||
|
|||
|
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP forum question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|