2015-04-14 60 views
0

我颳了外部網站並使用cfx_http5標籤來獲取數據爲cfhttp是非常慢的,所以與cfx_http5,它不做解決方案,用cfhttp它做解析,所以使URL指向從那裏文件相同的域即將將http請求頭添加到href與coldfusion的鏈接

現在我需要使用CFX標籤,但我所有的網址爲未來:與CFHTTP

與cfx_http5

<a href="details.cfm?acb=1>cick</a> 

<a href="http://theddomain.com/details.cfm?acb=1>cick</a> 

所以我怎樣才能在ColdFusion中添加代碼到這個URL追加到所有的HREF標記

請指導

+0

不知道,有機會看看http://stackoverflow.com/questions/19183903/cfhttp-first-request-fast-follow-slow –

+0

查看jSoup - http://jsoup.org。 –

回答

0

試試這個:如果你

<cfset httpResult = ReplaceNoCase(httpResult, '<a href="', '<a href="http://theddomain.com/', 'all')>

+0

nopes,它沒有做任何事情 – cfsam

+0

我跑我的服務器上的代碼和它的工作: The result was this: clickclick 2

+0

@cfsam:如果您發佈更多你的代碼(比如cfx_http5部分,以及你對結果做了什麼),我們可以幫助你更多。 –