Question
cfhttp user-agent question
I'm trying to get some information off a page. The info I
want is on:
https://www.memberst.com/Programs/SessionDetails.aspx?id=A00277BF-262C-4C2A-8FAA-58AAB8465589&sid=601275
and its the section that says x of 10 (last I checked it said 8 of 10).
I'm using the following code:
cfhttp method="get"
url="https://www.memberst.com/Programs/SessionDetails.aspx?id=A00277BF-262C-4C2A-8FAA-58AAB8465589&sid=601275"
useragent="Mozilla/4.0">
</cfhttp>
<cfset txt=cfhttp.FileContent>
<cfset re = ([-+]?\d+).*?(of).*?(10)>
<cfset m = #REFindNoCase(#re#,#txt#,1,"TRUE")#>
<cfif #ArrayLen(m.pos)# gt 1>
<cfset int1=#Mid(txt,m.pos[2],m.len[2])#>
<cfset word1=#Mid(txt,m.pos[3],m.len[3])#>
<cfset int2=#Mid(txt,m.pos[4],m.len[4])#>
<cfoutput>
(#replace(int1,"<" ,"<")#)(#replace(word1,"<"
,"<")#)(#replace(int2,"<" ,"<")#)
</cfoutput>
</cfif>
But it seems that the cfhttp is not using the user-agent, as I get back
10px; when I dump out 1 of the locations......
Any suggestions??
https://www.memberst.com/Programs/SessionDetails.aspx?id=A00277BF-262C-4C2A-8FAA-58AAB8465589&sid=601275
and its the section that says x of 10 (last I checked it said 8 of 10).
I'm using the following code:
cfhttp method="get"
url="https://www.memberst.com/Programs/SessionDetails.aspx?id=A00277BF-262C-4C2A-8FAA-58AAB8465589&sid=601275"
useragent="Mozilla/4.0">
</cfhttp>
<cfset txt=cfhttp.FileContent>
<cfset re = ([-+]?\d+).*?(of).*?(10)>
<cfset m = #REFindNoCase(#re#,#txt#,1,"TRUE")#>
<cfif #ArrayLen(m.pos)# gt 1>
<cfset int1=#Mid(txt,m.pos[2],m.len[2])#>
<cfset word1=#Mid(txt,m.pos[3],m.len[3])#>
<cfset int2=#Mid(txt,m.pos[4],m.len[4])#>
<cfoutput>
(#replace(int1,"<" ,"<")#)(#replace(word1,"<"
,"<")#)(#replace(int2,"<" ,"<")#)
</cfoutput>
</cfif>
But it seems that the cfhttp is not using the user-agent, as I get back
10px; when I dump out 1 of the locations......
Any suggestions??