浏览主站 | 站长合租 | 新闻资讯 | 站长学院 | 站长盈利 | HTML教程 | 网址导航 | 站长周刊 | 会员投稿 | 滚动新闻 | RSS
发新话题
打印

[代码问题] 爱下沙信息发布系统新闻调用问题请教!

爱下沙信息发布系统新闻调用问题请教!

源码名称:  测试修改『爱下沙信息发布系统(不错的发布系统)』(也就是西安二手网)
下载地址: http://bbs.zzchn.com/viewthread.php?tid=35268&page=1#pid140675
出现问题: 程序顶部有个 天气预报 是调用163的  我想把地区给改成深圳 可是我自己弄不懂
                希望高手帮下忙 指点下菜鸟我!

TOP

你把相关文件的代码发出来! 帮你看看!
收购女友,十成新以上。出厂日期为1982--1990年。各部件齐全,无破损。安全环保型。
高度:165-175cm。   质量:40kg~~50kg。外观整洁无瑕疵。    需ISO9002女性证明认证。 实用节能无噪音。

TOP

是天气预报不是新闻

TOP

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>天气预报</TITLE>
</HEAD>

<%@ Language=VBScript %>
<%
'获取远程文件
Function GetURL(url)
    Set Retrieval = CreateObject("Microsoft.XMLHTTP")
    With Retrieval
        .Open "GET", url, False
        .Send
        GetURL = .responsebody
                GetURL = Bytes2BStr(GetURL)
        if len(.responsebody)<100 then
                response.write "Error: Get URL"
                response.end
        end if

    End With
    Set Retrieval = Nothing
End Function

'二进制转换
Function bytes2bstr(vin)
        strreturn = ""
        for i = 1 to lenb(vin)
        thischarcode = ascb(midb(vin,i,1))
        if thischarcode < &h80 then
                strreturn = strreturn & chr(thischarcode)
        else
                nextcharcode = ascb(midb(vin,i+1,1))
                strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))
                i = i + 1
        end if
        next
bytes2bstr = strreturn
End Function

'取得特定文字之间的文字
Function GetBetween(Text0, Text1, Text2)
tmp_pos_1 = Instr(Text0, Text1)
tmp_pos_2 = Instr(Text0, Text2)
GetBetween = Mid(Text0, tmp_pos_1 + len(Text1), tmp_pos_2 - tmp_pos_1 - len(Text1))
End Function

function city(code)
<!-- 以下是163无余天气代码路径,请查询好你本地路径之后把这里替换即可--!>
Html=GetURL("http://news.163.com/weather/news/qx1/58457.html")
'xxxx01 = GetBetween ( Html, "this.swCity = """,  "this.swSubDiv")

'xxxx01 = GetBetween ( Html, "this.swCity = """,  "this.swSubDiv")
'xxxx02 = GetBetween ( Html, "this.swTemp = """,  "this.swTempCel")
'xxxx03  = GetBetween ( Html, "this.swCIcon = """, "this.swWindS")
'xxxx04 = GetBetween ( Html, "this.swWindS = """, "this.swWindD")
'xxxx05 = GetBetween ( Html, "this.swBaro = """,  "this.swHumid")
'xxxx06 = GetBetween ( Html, "this.swHumid = """, "this.swReal")
'xxxx07 = GetBetween ( Html, "this.swReal = """,  "this.swUV")
'xxxx08 = GetBetween ( Html, "this.swUV = """,    "this.swVis")
'xxxx09 = GetBetween ( Html, "this.swVis = """,   "this.swLastUp")
'xxxx10 = GetBetween ( Html, "this.swConText = """,   "this.swFore")

'xxxx01 = left(xxxx01, len(xxxx01) - 7)
'xxxx02 = Round(((5/9)*( CDbl(left(xxxx02, len(xxxx02) - 7)) -32)))
'xxxx03 = "weather_icon/" + left(xxxx03, len(xxxx03) - 7) + ".gif"
'xxxx04 = Round(CDbl(left(xxxx04, len(xxxx04) - 7)) * 1.609334, 2)
'xxxx05 = Round(CDbl(left(xxxx05, len(xxxx05) - 7)) * 3.386389, 2)
'xxxx06 = CDbl(left(xxxx06, len(xxxx06) - 7))
'xxxx07 = Round(((5/9)*(CDbl(left(xxxx07, len(xxxx07) - 7)) -32)))
'xxxx08 = CDbl(left(xxxx08, len(xxxx08) - 7))
'xxxx09 = Round(CDbl(left(xxxx09, len(xxxx09) - 7)) * 1.609334)
'xxxx10 = left(xxxx10, len(xxxx10) - 7)
'Response.write "<font size='1px'><b>"&xxxx01&"</b><br>"
'Response.write "<img src="""&xxxx03&""">"
'Response.write "["&xxxx10&"]<br>"
'Response.write "露点温度:"&xxxx02&"℃<BR>"
'Response.write "感觉温度:"&xxxx07&"℃<BR>"
'Response.write "紫外线强度:"&xxxx08&"<br>"
'Response.write "湿度:"&xxxx06&" %<br>"
'Response.write "风速:"&xxxx04&" 千米/小时<br>"
'Response.write "能见度:"&xxxx09&" 千米<br>"
'Response.write "气压:"&xxxx05 & "千帕<br></font>"
%>
<style>body, p {font-size:12px}</style>

<%=formatdatetime(now(),1)%><%
html=getbetween(html,"天气预报</span></a>","</div>")
Response.write Html
end function
%>


<%call city("CHXX0010")%><body>

TOP

这个是天气预报页面的代码

TOP

把这句Html=GetURL("http://news.163.com/weather/news/qx1/58457.html")
换成
Html=GetURL("http://news.163.com/weather/news/qx1/59493.html")

如果解决了,请回复一下
本帖最近评分记录

TOP

多谢 兄弟 已经解决

TOP

能不能告诉我下 这个网址是怎么找到的呀?
我也找了很久就是没有找到!
先谢谢了

TOP

事在人为,我跟你解释恐怕要费一番口舌,但如果你对网站建设构造熟悉的话,不难

TOP

发新话题