Re: [WebDNA] TCPConnect/cURL alternative for windows?

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104671
interpreted = N
texte = Donovan Brooke wrote: [snip] > Olin, > Looks fairly straight forward... I can test on my end if needed... would > need to talk to you off list to get access info etc.. > > Donovan Yes, I get a 5 second delay or so with TCPconnect just to get the error, compared to the mirror PHP/Curl script to get the error. TCPConnect loads the error in 5.3 seconds. PHP/Curl loads it in .54 seconds. Here are the two testing snippets: ----WebDNA [math show=F]m_start=[ELAPSEDTIME][/math] [text scope=global]tcontent=[url]?apiKey=&token=&format=xml[/url][/text] [text scope=global]crlf=[unurl]%0D%0A[/unurl][/text] [text scope=global]t_host=rpxnow.com[/text] [text scope=global]r=[tcpconnect host=[t_host]&port=443&ssl=T][tcpsend skipheader=T][!] [/!]GET /api/v2/auth_info[unurl][tcontent][/unurl] HTTP/1.1[crlf][!] [/!]Host: [t_host][crlf][!] [/!]Content-type: application/x-www-form-urlencoded[crlf][!] [/!]Content-length: [countchars][tcontent][/countchars][crlf][!] [/!][crlf][!] [/!][tcontent][crlf][!] [/!][/tcpsend] [/tcpconnect][/text] 
[format .4f][math]([elapsedtime]-[m_start])/60[/math][/format]-seconds to load
[r]
--------END WebDNA ----PHP $token, 'apiKey' => 'xxxxxxxxxxxxxxxxxxxx', 'format' => 'xml'); //Set to either 'json' or 'xml' // set up curl $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, 'https://rpxnow.com/api/v2/auth_info'); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $r = curl_exec($curl); $time_end = microtime(true); $time = $time_end - $time_start; echo "$time seconds to parse
"; echo "
$r
"; ?> -------END PHP Here is my guess at the problem... I have seen where our TCPConnect interacts with certain SSL cert configs and certain SSL certs in strange ways. Unfortunately, we can't change how rpxnow integrates their SSL stuff and we are stuck with tcpconnects' idiosyncrasies for the time being.. so I suggest that for this solution, finding an alternate solutions is best. If Olin has PHP, it would be fairly interesting to call PHP via [DOS] to run the code (include file) posted above and to then parse the return value in WebDNA! ;-) Gotta love the WebDNA syntax.. but we have a *long* way to go until it catches up to the maturity level of other languages. That is just the cold hard truth! ;-) Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-forum.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Donovan Brooke 2010)
  2. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Donovan Brooke 2010)
  3. RE: [WebDNA] TCPConnect/cURL alternative for windows? ("Olin Lagon" 2010)
  4. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Donovan Brooke 2010)
  5. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Bob Minor 2010)
  6. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Stuart Tremain 2010)
  7. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Kenneth Grome 2010)
  8. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Donovan Brooke 2010)
  9. RE: [WebDNA] TCPConnect/cURL alternative for windows? ("Olin Lagon" 2010)
  10. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Bob Minor 2010)
  11. Re: [WebDNA] TCPConnect/cURL alternative for windows? (Donovan Brooke 2010)
  12. [WebDNA] TCPConnect/cURL alternative for windows? ("Olin Lagon" 2010)
Donovan Brooke wrote: [snip] > Olin, > Looks fairly straight forward... I can test on my end if needed... would > need to talk to you off list to get access info etc.. > > Donovan Yes, I get a 5 second delay or so with TCPconnect just to get the error, compared to the mirror PHP/Curl script to get the error. TCPConnect loads the error in 5.3 seconds. PHP/Curl loads it in .54 seconds. Here are the two testing snippets: ----WebDNA [math show=F]m_start=[elapsedtime][/math] [text scope=global]tcontent=[url]?apiKey=&token=&format=xml[/url][/text] [text scope=global]crlf=[unurl]%0D%0A[/unurl][/text] [text scope=global]t_host=rpxnow.com[/text] [text scope=global]r=[tcpconnect host=[t_host]&port=443&ssl=T][tcpsend skipheader=T][!] [/!]GET /api/v2/auth_info[unurl][tcontent][/unurl] HTTP/1.1[crlf][!] [/!]Host: [t_host][crlf][!] [/!]Content-type: application/x-www-form-urlencoded[crlf][!] [/!]Content-length: [countchars][tcontent][/countchars][crlf][!] [/!][crlf][!] [/!][tcontent][crlf][!] [/!][/tcpsend] [/tcpconnect][/text] 
[format .4f][math]([elapsedtime]-[m_start])/60[/math][/format]-seconds to load
[r]
--------END WebDNA ----PHP $token, 'apiKey' => 'xxxxxxxxxxxxxxxxxxxx', 'format' => 'xml'); //Set to either 'json' or 'xml' // set up curl $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, 'https://rpxnow.com/api/v2/auth_info'); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $r = curl_exec($curl); $time_end = microtime(true); $time = $time_end - $time_start; echo "$time seconds to parse
"; echo "
$r
"; ?> -------END PHP Here is my guess at the problem... I have seen where our TCPConnect interacts with certain SSL cert configs and certain SSL certs in strange ways. Unfortunately, we can't change how rpxnow integrates their SSL stuff and we are stuck with tcpconnects' idiosyncrasies for the time being.. so I suggest that for this solution, finding an alternate solutions is best. If Olin has PHP, it would be fairly interesting to call PHP via [DOS] to run the code (include file) posted above and to then parse the return value in WebDNA! ;-) Gotta love the WebDNA syntax.. but we have a *long* way to go until it catches up to the maturity level of other languages. That is just the cold hard truth! ;-) Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-forum.com Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Out of the woodwork (2007) [SHOWIF] (1997) Upgrading old WebCat Database Files (1997) Download to disk NOT display in browser (2002) Modulo function? (2000) [REDIRECT url=http://isd.smithmicro.com/] into New Window? (2002) Letters as SKU (1998) can you see what is wrong here? (2002) setlineiems and UnitShip Cost (2000) How to add product size choices to form? (1997) CloseDataBase vs CommitDataBase (2007) Multiple Merchant Accounts? (1997) minimalist shopping cart. (1997) WebDNA performance comparisons? (2004) WebCatalog can't find database (1997) .. more on sliding discounts... (1997) emailer settings and control questions (1997) webcat2b12 CGI -- Date comparisons (1997) passing search criteria (1997) off-topic: stylesheet questions ... (2003)