Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Vbprog40 #1
CFHTTP Question
If you go to this site it works fine.
[url]http://forums.agd.org/n/mb/message.asp?webtag=agdSmileline&msg=1736.1[/url] So I
am trying to GET these in a CFhttp query. Here is my code: <cfhttp url =
'http://forums.agd.org/n/mb/message.asp?webtag=agdSmileline&msg=1736.1'
method='get'> But i get a StatusCode of '302 Object moved' How can I get
this to work? Thank you!
Vbprog40 Guest
-
CFHTTP
Hello, I need to send data from a CF page to an asp.net page for processing via a URL string. The ASP page takes three parameters. Those being... -
cfhttp & cfdocument question
I am working with CFMX7 and the new cfdocumet tag. I have a db search that I would like to export to a PDF doc. So, I have: <!DOCTYPE HTML... -
cfhttp erro
I have been trying to read a tab delimited text file with cfhttp get and I keep getting this error - The column name '<!DOCTYPE HTML PUBLIC... -
CFHTTP Get Content
I am trying to just grab some text from a website using CFHTTP. The code before the text is: <td class=boldText><b> The code after the text is:... -
CFHTTP help
We have an in-house built publication system that creates .htm files from database content. For a specific project, I need to modify the way that... -
Kronin555 #2
Re: CFHTTP Question
If you disable cookies and try to go to that link, you get the same thing (it redirects to a login page).
Kronin555 Guest
-
Mr Black #3
Re: CFHTTP Question
Have to login first (or just visit the login page), get cookies, and use them in futher requests.
Mr Black Guest
-
Vbprog40 #4
Re: CFHTTP Question
If you go to that link it works fine... There are cookies that are being set so
that maybe the problem...not really sure. You dont have to login anywhere. If
anyone has any coding sudjections Im all hears. Thank you
Vbprog40 Guest
-
Mr Black #5
Re: CFHTTP Question
1. You have to login. When you hit that page without appropriate cookie set,
it re-directs you to:
[url]http://login.prospero.com/dir-login/clientLogin.asp?webtag=agdSmileline&[/url] .
.. . <your URL follows> . . . . 'Login' happens here by setting a few
cookies. And re-directing you back to the original URL. Therefore, whatever
you think is single HTTP request, it is, in fact, three requests. 2. It
works in the browser, because browser handles this process for you. To use
CFHTTP you have to do this on your own. 3. Try your CFHTTP call with this HTTP
header 'Cookie' set: Cookie: ARPT=JJXRWOS10.0.1.105CKKKU;
LOGIN=1%7CG%2D41986731%7C1161846927%7C1113704927%7 C1745593155%7CUI41986731%5ENZ1
%5EAR299%5EFP%2D1%7C1%7Csfp3Az3MSueNUe%2BHG%2BUNnw ;
ppref=1%7BCD8DC22C%2DAC52%2D41D4%2D9EBF%2D1613BB56 3D33%7DhBpEjSM1FQ266%2B6eTXzRJ
w%3D%3D You will see that now your CFHTTP works just fine. 4. As about coding
suggestions, if you under Windows, try this:
[url]http://www.cftagstore.com/tags/cfxhttp5.cfm[/url]
Mr Black Guest
-
Vbprog40 #6
Re: CFHTTP Question
Would love to purchase the CFX_HTTP Script... however this is for a non profit
group so the budjet is really low. I used this as my code: <cfhttp url =
'http://forums.agd.org/n/mb/message.asp?webtag=agdSmileline&msg=1736.1'
method='POST'> <cfhttpparam name = 'ARPT' type = 'Cookie' value =
'ARPT=JJXRWOS10.0.1.105CKKKU'> <cfhttpparam name = 'LOGIN' type = 'Cookie'
value =
'=1%7CG%2D41986731%7C1161846927%7C1113704927%7C174 5593155%7CUI41986731%5ENZ1%5EA
R299%5EFP%2D1%7C1%7Csfp3Az3MSueNUe%2BHG%2BUNnw'> <cfhttpparam name = 'ppref'
type = 'Cookie' value =
'ppref=1%7BCD8DC22C%2DAC52%2D41D4%2D9EBF%2D1613BB5 63D33%7DhBpEjSM1FQ266%2B6eTXzR
Jw%3D%3D'> </cfhttp> However it still didn't work. Am i doing something
wrong? Thank you again.
Vbprog40 Guest
-
Mr Black #7
Re: CFHTTP Question
Perhaps, it doesn't work, because the session expired. Cookie I've posted was
valid at the moment I typed the message. As I already mentioned, you have two
options here: Use CFX_HTTP5 that handles cookies and sessions for you (this is
what we use). Do all the process of 'login' (don't undersand why they do that
on the Web-site like this) on your own: 1. Create a variable (list or array) to
store cookies. 2. Issue the first CFHTTP with disabled redirects. 3. If 30x
code was returned, extract redirection URL, extract cookies. If 200 code
returned, you done. 4. Add/Replace cookies in your storage variable. 5. Issue
another CFHTTP to redirection URL with cookies set. 6. Goto (3). As I can see
from here, your case requires three CFHTTP calls to extract the target page.
Mr Black Guest
-
Frank D'Elia #8
CFHTTP Question
Hello,
I never used CFHTTP in a "real" situation before, but now I think this the
perfect time to do so. But I am running into a problem, I am trying to send an
SMS message through an aggregator. The code is below, but I do not want my
action page to be the action page that the guy emailed to me, since I am
running other code as well, like inserts, etc I would like to just cfhttp the
information the the page that was set up for me. Am I missing anything? When I
try using the action page by itself, it DOES work. Just not through cfhttp.
Any help would be appreciated.
--
Frank
<!--- Code Emailed To Me Below --->
<form method="POST"
action="http://www.- - - - - - -.com/sms/sending.php">
<p>Enter phone number to send the message to: <input
type="text" name="PhoneNumber" size="11"</p>
<p>Type in your message:</p>
<p><input type="text" name="TextMessage"
size="50"><p>
<p><input type="submit" value="Submit"
name="B1"></p>
</form>
<!--- My CF code --->
<cfhttp method="post" url="http://www.- - - - - - -.com/sms/sending.php">
<cfhttpparam type="formfield" name="textmessage" value="This is a test">
<cfhttpparam type="formfield" name="PhoneNumber" value="5555555555">
<cfhttpparam type="formfield" name="B1" value="Submit">
</cfhttp>
Frank D'Elia Guest



Reply With Quote

