- COOKIEJAR: it sets the cookie variables in the local machine and stores it in a file. we store it for later use. This file is written in netscap cookie file format. the values are delimited with a tab. A cookie is stored on a single line.
- COOKIEFILE: This variable sends the cookie file to the remote server.
see the following code block. it explains the above discussion.
//create cURL connection $curl_connection = curl_init('remote_server_url'); //set options curl_setopt($curl_connection, CURLOPT_POST, TRUE); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, false); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1); //set data to be posted curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); curl_setopt($curl_connection, CURLOPT_COOKIEJAR, 'cookies.txt'); curl_setopt($curl_connection, CURLOPT_COOKIEFILE, 'cookies.txt');
Here we send the cookie with the last two lines.
Now if we redirect our header in the remote server, then there will be a problem. your server then could not find the cookie file. and you will be signed out or related problem will be arose.
To solve this problem, you need to set your cookie after redirect call is made. So, you need to set cookie like this after a redirection is made.
setcookie('asite', $site, time()+60*60, '/', 'site.com');
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide
List of my works:
Technical Support:
If you still face the technical problem, please get support of our highly skilled technical team: garazlab.com.
Wordpress Plugins:
If you still face the technical problem, please get support of our highly skilled technical team: garazlab.com.
Wordpress Plugins:
- Real-Time Health Data from Every Where:WP plugin to display real-time health data & increase sale by promoting user specific products according to health information: garazlab.com.
- Woocommerce Stock Notification Builder:Sends desktop, mobile & email notifications with full customization.Build your own product notification system with it: garazlab.com.
Opencart Extensions:
- Product Based Quantity Wise Shipping: Find it here.
- OpenSSLCOMMERZ: integrate SSLCOMMERZ with opencart: Find it here.
- Fine Search v.1.0 - Improves Opencart search feature to find relevant: Find it here.
- Opensweetcaptcha - An easy way to generate attractive captcha for your system!: Find it here.
- Custom Field Product - add unlimited custom fields to the product form: Find it here.
- Formcaptcha - add captcha on the register page: Find it here.
No comments:
Post a Comment