How to Post to .aspx using Curl in php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sabin14
    replied
    Thank u very much. It worked.
    Last edited by sabin14; 08.01.12, 13:05.

    Leave a comment:


  • GumSlone
    replied
    PHP Code:
    $url 'your url goes here';
    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url);
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    curl_setopt($chCURLOPT_TIMEOUT5);
    curl_setopt($chCURLOPT_CONNECTTIMEOUT5); 
    curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_0);
    curl_setopt($chCURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded''Connection: Close'));       
    $contents curl_exec($ch);
    curl_close($ch);
    echo 
    $contents

    Leave a comment:


  • sabin14
    replied
    my host doesnot file_get_contents. Can u please provide the curl code.

    Leave a comment:


  • GumSlone
    replied
    Originally posted by sabin14 View Post
    I Tried . but it is not posting .


    I want to post in this fashion


    I should get +1 as the result on screen for posting

    please help
    i think you dont even need to send a post request a simple get would work too:
    PHP Code:
    $url 'your url goes here';
    $contents file_get_contents();
    echo 
    $contents

    Leave a comment:


  • sabin14
    replied
    I Tried . but it is not posting .

    [url]http://mysite.com/example.aspx
    I want to post in this fashion


    I should get +1 as the result on screen for posting

    please help
    Last edited by sabin14; 08.01.12, 12:46.

    Leave a comment:


  • GumSlone
    replied
    Originally posted by sabin14 View Post
    I want to post to .aspx using php in curl. The site does not require cookie.
    I tried as normal curl positng and It didnt post. can anyone provide me the code?
    the same way like you post to php using php curl

    Leave a comment:


  • sabin14
    started a topic How to Post to .aspx using Curl in php

    How to Post to .aspx using Curl in php

    I want to post to .aspx using php in curl. The site does not require cookie.
    I tried as normal curl positng and It didnt post. can anyone provide me the code?
Working...
X