Could you help me with a simple cURL script ?
Posted: Wed Mar 25, 2009 9:51 am
Hi there ,
All day I have been stumped with this problem.
Ive tried cURL and other stuff but nothing works.
I just get a blank page. Anyway I am desperate now.
My eyes are bloodshot , I just want to go to bed.
I would be very greatfull for your help .
Please see this page:
http://swathe.cart.net.au/details/2153603.html
I want to simulate the clicking of that "Add to Basket" button.
Could you please help me make a simple script (doesn't have to be using cURL) to do this ?
I know its easy.
Here is my(broken) script:
Thank you for your help 
All day I have been stumped with this problem.
Ive tried cURL and other stuff but nothing works.
I just get a blank page. Anyway I am desperate now.
My eyes are bloodshot , I just want to go to bed.
I would be very greatfull for your help .
Please see this page:
http://swathe.cart.net.au/details/2153603.html
I want to simulate the clicking of that "Add to Basket" button.
Could you please help me make a simple script (doesn't have to be using cURL) to do this ?
I know its easy.
Here is my(broken) script:
Code: Select all
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://swathe.cart.net.au/action_handler.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"product_inputs[details]=fat¤t_loc=/details/2558766.html&_action=add&prd_id=2232162");
echo curl_exec ($ch);
curl_close ($ch);
?>