#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Cool PHP CURL help needed .


    What will be the CURL postfields of this html form in php.

    <form method="post" action="update-cart.php?action=do-update… name="upgrade" class="upgrade">
    <input type="hidden" id="updatecart" name="updatecart" value="35b35rt45" />
    <input type="hidden" name="http_referer" value="/cart/update-cart.php" />
    <p><input id="upgrade" class="button" type="submit" value="Upgrade by click here" name="upgrade" /></form>
    I have tried it , but no result : -

    $urlto=('mysite.com');
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $urlto);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,"upgrade=Upgrade by click here");
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER…
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
    curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
    curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");

    $buffer = curl_exec($ch);
    Can someone tell me that , What is the correct postfields ? please
  2. #2
  3. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,548
    Rep Power
    2337
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by ptr2void
    Learn how to POST
    Thanks bro. I know something about CURL POST.
    But this is little bit difference bcoz there has no action value hare.
    So, if anyone can help me, it will good for me.

IMN logo majestic logo threadwatch logo seochat tools logo