Post data from ASP website to PHP website

Xtr

New Member
I am developing an opt-in/opt-out API for Mobile numbers which can be placed at the top of any website, so people can subscribe to receive an SMS to their mobile numbers.I have the below script which basically post data between my PHP websites USING \[code\]Curl\[/code\] which is working more than fine:\[code\]<?php$url = "http://myserverurl.com/optin.php";$postdata['customer_id'] = "1";$postdata['mobilenumber'] = $_POST['mobilenumber'];$useragent= "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" ;$ch = curl_init();//set some cookie details up (depending on the site)curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");curl_setopt($ch, CURLOPT_USERAGENT, $useragent); //set our user agentcurl_setopt($ch, CURLOPT_POST, 1); //set how many paramaterscurl_setopt($ch, CURLOPT_URL,$url); //set the url we want to usecurl_setopt($ch, CURLOPT_POSTFIELDS,$postdata); //set data to post$result= curl_exec ($ch); //execute and get the resultscurl_close ($ch);//print $result; //display the reuslt?>\[/code\]How to apply this approach if the website is in \[code\]ASP.net\[/code\]? Is there anything similar to \[code\]Curl\[/code\] in \[code\]ASP.net\[/code\]? Thanks,
 
Back
Top