Could you help me with a simple cURL script ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
baross
Forum Newbie
Posts: 3
Joined: Wed Mar 25, 2009 9:41 am

Could you help me with a simple cURL script ?

Post 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:
baross
Forum Newbie
Posts: 3
Joined: Wed Mar 25, 2009 9:41 am

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

Post 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"
Post Reply