Posts Tagged ‘CURLOPT_RETURNTRANSFER’

Check Site Loading Speed using CURL curl_getinfo() in PHP.

Monday, June 22, 2009 10:06 3 Comments

We use curl_getinfo() in to get the information of last transfer that made use of curl functions in PHP.  Using the following code we can get the time taken to load a webpage. $ch = curl_init(‘http://www.inetminds.com/parsing-xml-feeds-in-php-with-simplexml-111/’); // set  cURL to return the contents in a variable instead of giving it to the browser. curl_setopt($ch, CURLOPT_RETURNTRANSFER, [...]

This was posted under category: PHP, Programming Tags: , , , , , ,

Using curl functions in php to send sms for smaple sms gateway

Saturday, November 8, 2008 11:42 14 Comments

This is a sample code assuming we have a sms gateway with name smsgateway.co.cc. We have take a sample $curlPost = ‘Mobile_No=9000099119&Type=SMS&Message=”This is a test message”‘; //we have to pass the mobile number and message as argument to the url. $LOGINURL = “http://smsgateway.co.cc/UserMiscellaneousMT.asp”; //This url will be provided by our gateway $agent = “Mozilla/5.0 (Windows; U; [...]

This was posted under category: PHP, Programming Tags: , , , , , , , , , ,