How to Post to .aspx using Curl in php
Started on the old forum in January 2012 · view the original in the archive · old links redirect here
sabin14 wrote: 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
Advertise your mobile site for FREE with AdTwirl
I Tried . but it is not posting .
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
Show me your ways, LORD, teach me your paths. Guide me in your truth and teach me, for you are God my Savior (Psalm 25:4)
sabin14 wrote: I Tried . but it is not posting .
http://ubaid.tk/sms/sms.aspx?uid=9746674889&pwd=password&phone=9746674889&msg=hjgyjgKJKJK&provider=way2sms&send=SEND 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:
$url = 'your url goes here';
$contents = file_get_contents();
echo $contents;
Advertise your mobile site for FREE with AdTwirl
$url = 'your url goes here';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close'));
$contents = curl_exec($ch);
curl_close($ch);
echo $contents;
Advertise your mobile site for FREE with AdTwirl