Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Cfhttp problem

    Im trying to loop through an array elements (in this case URLs) using cfhttp,
    there are several elements in the array but I can only cfhttp the first
    element. My code looks right and all the URL's values can be cfhttp'd manually.
    Could someone take a look at my code to check im not missing anything? <cfset
    counter = 1> <!---HTTP Call each site index attribute from the XML---> <cfhttp
    method='get' URL='#Trim(xmlObj.xmlRoot.site[counter].xmlAttributes.index)#'
    ResolveURL='no'> <cfset StartPos = 1> <cfloop condition ='True'> <!---Parse
    the site index pages for job links---> <cfset Match =
    REFindNoCase(#Trim(xmlObj.xmlRoot.site[counter].parse.xmlAttributes.re)#,
    cfhttp.FileContent, StartPos, True)> <cfif Match.pos[1] EQ 0> <cfbreak>
    <cfelse> <cfset StartPos = Match.pos[1] + Match.len[1]> <cfset StripLinks =
    #REReplaceNoCase(#Mid(cfhttp.FileContent, Match.pos[1], Match.len[1])#,'=['']',
    'http://www.rspb.org.uk/vacancies/index.asp', 'ALL')#> <cfset LinksArray =
    ListToArray(StripLinks)> <cfloop from='1' to='#arrayLen(LinksArray)#'
    index='i'> <cfhttp method='get' url='#LinksArray#'></cfhttp> <cfdump
    var='#cfhttp.FileContent#'> </cfloop> </cfif> </cfloop>

    samb1 Guest

  2. Similar Questions and Discussions

    1. problem with CFHTTP: Connection Failure
      I'm having the exact same problem. I'm on MX 6.1 I'm trying to post my xml like this <cfhttp url = "http://10.1.6.211/ProposalGenerator.aspx"...
    2. cfhttp call problem from a CF MX 6.1 on DMZ
      I am runing into a technical difficulty in using the cfhttp tag and I hope someone can help me out. I have this part of the code: ...
    3. CFHTTP get file problem
      Hi, I have code to read a text file on my server and process it into a database, this works fine. The text file comes from a remote server that...
    4. Problem with looping over cfhttp
      Hi, I am trying to get some image files from a remote server and save them to my server. I have all the paths in a query but when I loop over...
    5. CFHTTP Get Problem
      I have set up a Cfhttp screen to load data into my application. I am using the cfhttp tag to create a query variable that returns the data. I am...
  3. #2

    Default Re: Cfhttp problem

    Any ideas with this one guys?
    Ive been stuck with this for 2 days.
    Thanks in advance
    samb1 Guest

  4. #3

    Default RE: Cfhttp problem

    Questions:
    1. Why do you have the first cfhttp call outside the loop?
    2. Why is there no end tag for the first cfhttp call?
    3. Where are you incrementing your counter?
    Rob Guest

  5. #4

    Default CFHTTP Problem

    I am using the cfhttp and cfhttpparam tags to gain access to a page on our
    intranet that has a security header. I can pass the parameters to get by the
    security but the cfhttp.fileContent is the login page not the eventual page
    that I go to. I have tried using multiple cfhttp tags but get the same result.
    Any suggestions?

    michaelblake Guest

  6. #5

    Default CFHTTP Problem

    I am have in a problem posting and connecting to a vendor that is hosting an
    online store for our website. Actually, I am able to get a connection and
    response from his login page for customers that already exsist. However, when
    trying to add a new customer and post that information I am getting a
    "Connection Failure" message.

    Why would I be able to connect to one page, but not the second using basically
    the same commands just passing some extra fields of data?


    steve0331@hotmail.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139