Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReadURL PRG not sending POST data

Status
Not open for further replies.

jennyflower

Programmer
Oct 10, 2006
60
0
0
GB
Hi - Im trying to use a PRG called ReadURL which I found at
Im using the one at the bottom which can do passwords and post data, unfortunately I cannot get it actually send any post data. Am I doing something wrong? I am calling the function using:

ReadURL( " .f., .f., .f., .f., .f., 'xmldata=' + z_xmltext)

My php page should take the post data and create file with the information. It will work if I tag z_xmltext as Get data, but as I am potentially sending through quite large amounts of data I will need to use Post.

Thanks,
Jenny
 
have you tried putting an ASSERT right before the line
*// Send request , and tracking through?
 
See if this works for you

Code:
lsURL = '[URL unfurl="true"]http://localhost/readstock.php'[/URL]
lsSendThis = 'SomeContent'

loHTTP = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")	
loHTTP.Open("POST", lsURL, .F.)
loHTTP.SetCredentials('UserName', 'Password', 0)
loHTTP.SetRequestHeader("content-type", "application/x-[URL unfurl="true"]www-form-urlencoded")[/URL]	
loHTTP.Send(STRCONV(lsSendThis, 9))  && UTF encoding

if you decide to use the WinHttpRequest interface you may want to check out the documentation on it as it also supports setting timeout thresholds and certificates if that becomes an issue for you.

Good luck

Ralph Kolva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top