Page 1 of 1

Could you help me with a simple cURL script ?

Posted: Wed Mar 25, 2009 9:51 am
by baross
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:

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&current_loc=/details/2558766.html&_action=add&prd_id=2232162");
echo curl_exec ($ch);
curl_close ($ch);
?>
 
Thank you for your help :wink:

Re: Could you help me with a simple cURL script ?

Posted: Wed Mar 25, 2009 7:34 pm
by baross
hi there still stuck with this.
basically what im asking (if its not to much)
is for you just to check out that page and make a script to simulate the clicking of the "Add to cart button"