Programmers for Hire
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgrammers for Hire

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 ASP Free Forums Sponsor:
  #1  
Old January 15th, 2004, 07:17 AM
chanani_s chanani_s is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 6 chanani_s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 31 sec
Reputation Power: 0
Encoding problem in ASP file

Hi
I am getting problems in display of ASP files
Everything is working fine on this site
http://dmoz.org/World/
But when I import this data to my site there is some problem
http://www.amiwired.com/directory.asp?ID=/World/
See the strange characters as in like
Catalan?b Espa?b etc
You can download the two asp files which are being used here
file1
file2
Any help would be highly appreciated
Email me: advanced_programmer@hotmail.com
or IM me AIM: sandeepchn
Thanks

PS: dir.xyz is actually dir.asp and directory.xyz is actually
directory.asp, I changed the extensions so that you can
download them

Reply With Quote
  #2  
Old January 15th, 2004, 07:19 AM
chanani_s chanani_s is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 6 chanani_s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 31 sec
Reputation Power: 0
Definitely some problem in the code given below

--------------------------------------------
<%
If Request("ID") = "" Then
Response.Redirect "index.asp"
End If
Function getit(strAdd,strFrom,strTo)
Dim objXMLHTTP, strGot, strSource
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", strAdd, False
objXMLHTTP.Send
strSource = objXMLHTTP.responseText
'strSource=server.URLEncode(strSource)
'strSource=server.htmlEncode(strSource)
Set objXMLHTTP = Nothing

Dim b,e
b=Instr(strSource,strFrom)
If b<>0 Then
b=b+Len(strFrom)
e=Instr(b,strSource,strTo)
strGot=Mid(strSource, b, e-b)
Else
Response.Write " "
End If

getit = strGot
End Function

dim Grabbed, CopyFrom, CopyTo

Grabbed = "http://dmoz.org/" & request.querystring("ID")
CopyFrom = "</form>"
CopyTo = "<table width=""95%"" cellpadding=0 cellspacing=0>"

Dim strSource
strSource = getit(Grabbed,CopyFrom,CopyTo)
strSource=Replace(strSource,"<b>","")
strSource=Replace(strSource,"</b>","")

'strSource=Replace(strSource,"ñ","ñ")
'strSource=Replace(strSource,"<li>","<br>")
'strSource=Replace(strSource,"<ul>"," ")
'strSource=Replace(strSource,"</ul>"," ")
strSource=Replace(strSource,"<hr>"," ")
strSource=Replace(strSource,"+1","2")

'strSource=Replace(strSource,"ñ","ñ")

Dim once, twice

once = Replace(strSource,"<a href=""desc.html","<a href=""http://dmoz.org/" & Request("ID") & "desc.html" & """" & " target=""_new")
twice = Replace(once,"href=""/","href=""directory.asp?ID=")
'twice =replace(twice,"ñ","ñ")
If twice = "" Then
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgrammers for Hire > Encoding problem in ASP file


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 4 hosted by Hostway