Hi,
I am trying to integrate chornoform V4RC3.3 with jnews core V7.5.1 using curl action to pass on subscription information.
I have tried both the builtin curl action and the latest curl_gh action.
The builtin curl action doesn't seem to be working at all for me. It throws up various errors and the curl array values are coming up blank. Following are the relevant outputs from the debugger
[color=#FF0000]Notice: Undefined index: com_jnews in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: subscribe in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: 1 in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: 1 in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: [email]test@ads.com[/email] in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: test in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: xxxxxx in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined variable: curl_values in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 33
CURL OK : the CURL function was found on this server.
$curl_values: option=&act=&listid=&receive_html=&email=&name=&passwordA=
curl_target_url: http://www.testserver.com.au/index.php
CURL OK : the CURL function was found on this server.
$curl_values:
curl_target_url: http://[/color]
With the curl_gh action it seems to be doing everything right but the array is constructed with the special characters converted to html code. For example @ is converted to %2540 which when passed on to jnews is failing as jnews doesn't recognize it as a valid email address. Debugger output as follows,
cURL OK : the cURL function was found on this server.
cURL Target URL: http://www.testserver.com.au/index.php
Names + values (urldecoded)
option : com_jnews
act : subscribe
listid : 1
receive_html : 1
email : [email]test@ads.com[/email]
name : test
passwordA : xxxxxx
cURL Values: option=com_jnews&act=subscribe&listid=1&receive_html=1&email=test%2540ads.com&name=test&passwordA=xxxxxx
cURL:Resource id #84
cURL info: Array ( [url] => [url=http://www.testserver.com.au/index.php]http://www.testserver.com.au/index.php[/url] [content_type] => text/html; charset=iso-8859-1 [http_code] => 404 [header_size] => 170 [request_size] => 262 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.047 [namelookup_time] => 0.016 [connect_time] => 0.031 [pretransfer_time] => 0.031 [size_upload] => 106 [size_download] => 221 [speed_download] => 4702 [speed_upload] => 2255 [download_content_length] => 221 [upload_content_length] => -1 [starttransfer_time] => 0.047 [redirect_time] => 0 )
I have tried a lot of things to get it to work but no luck 😢 Any help will be much appreciated.
By the way I have tried this with the simplest of form just name and email input box) and it is still having the same issue.
My dev environment info,
OS: Windows 2003 Server 32 bit with WAMP server 2.2d
PHP: 5.3.0
MySQL: 5.1.36
Apache 2.2.11
Joomla: 1.5.26
Please let me know if any further info is required. Many thanks!
I am trying to integrate chornoform V4RC3.3 with jnews core V7.5.1 using curl action to pass on subscription information.
I have tried both the builtin curl action and the latest curl_gh action.
The builtin curl action doesn't seem to be working at all for me. It throws up various errors and the curl array values are coming up blank. Following are the relevant outputs from the debugger
[color=#FF0000]Notice: Undefined index: com_jnews in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: subscribe in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: 1 in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: 1 in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: [email]test@ads.com[/email] in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: test in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined index: xxxxxx in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 30
Notice: Undefined variable: curl_values in D:\wamp\www\administrator\components\com_chronoforms\form_actions\curl\curl.php on line 33
CURL OK : the CURL function was found on this server.
$curl_values: option=&act=&listid=&receive_html=&email=&name=&passwordA=
curl_target_url: http://www.testserver.com.au/index.php
CURL OK : the CURL function was found on this server.
$curl_values:
curl_target_url: http://[/color]
With the curl_gh action it seems to be doing everything right but the array is constructed with the special characters converted to html code. For example @ is converted to %2540 which when passed on to jnews is failing as jnews doesn't recognize it as a valid email address. Debugger output as follows,
cURL OK : the cURL function was found on this server.
cURL Target URL: http://www.testserver.com.au/index.php
Names + values (urldecoded)
option : com_jnews
act : subscribe
listid : 1
receive_html : 1
email : [email]test@ads.com[/email]
name : test
passwordA : xxxxxx
cURL Values: option=com_jnews&act=subscribe&listid=1&receive_html=1&email=test%2540ads.com&name=test&passwordA=xxxxxx
cURL:Resource id #84
cURL info: Array ( [url] => [url=http://www.testserver.com.au/index.php]http://www.testserver.com.au/index.php[/url] [content_type] => text/html; charset=iso-8859-1 [http_code] => 404 [header_size] => 170 [request_size] => 262 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.047 [namelookup_time] => 0.016 [connect_time] => 0.031 [pretransfer_time] => 0.031 [size_upload] => 106 [size_download] => 221 [speed_download] => 4702 [speed_upload] => 2255 [download_content_length] => 221 [upload_content_length] => -1 [starttransfer_time] => 0.047 [redirect_time] => 0 )
I have tried a lot of things to get it to work but no luck 😢 Any help will be much appreciated.
By the way I have tried this with the simplest of form just name and email input box) and it is still having the same issue.
My dev environment info,
OS: Windows 2003 Server 32 bit with WAMP server 2.2d
PHP: 5.3.0
MySQL: 5.1.36
Apache 2.2.11
Joomla: 1.5.26
Please let me know if any further info is required. Many thanks!
Just to add to my previous post using custom code and redirect action everything works perfectly. However, I want to use the curl option to process in background as redirection displays a blank page.
OK I think I have fixed the issue with the builtin curl action.
Based on the error thrown I have modified the curl.php line 30
From: $curl_values[$fields_data[0]] = $form->data[trim($fields_data[1])];
To: $curl_values[$fields_data[0]] = trim($fields_data[1]);
and it works now. Is this a bug?
I would still like opinions of the expert and soultion for curl_gh action as it is much better for getting dynamic form data.
Based on the error thrown I have modified the curl.php line 30
From: $curl_values[$fields_data[0]] = $form->data[trim($fields_data[1])];
To: $curl_values[$fields_data[0]] = trim($fields_data[1]);
and it works now. Is this a bug?
I would still like opinions of the expert and soultion for curl_gh action as it is much better for getting dynamic form data.
Lol solved the curl_gh issue also. Changed line 163 of curl_gh.php
From: function paramsToArray( $params = '', $name = 'Parameter', $urlencode = true )
To: function paramsToArray( $params = '', $name = 'Parameter', $urlencode = false )
From: function paramsToArray( $params = '', $name = 'Parameter', $urlencode = true )
To: function paramsToArray( $params = '', $name = 'Parameter', $urlencode = false )
Hi mquais,
I've updated the cURL [GH] action to have urlencoding as an option - it is needed if you are passing the data using 'get' rather than 'post'.
Bob
I've updated the cURL [GH] action to have urlencoding as an option - it is needed if you are passing the data using 'get' rather than 'post'.
Bob
This topic is locked and no more replies can be posted.