2015-04-14 59 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部分,以及你对结果做了什么),我们可以帮助你更多。 –