You need to sign in to do that
Don't have an account?
wixxey
Apex Alternative code for PHP
I have and PHP code for accessing the FluidSurvey API. anyone who can give me its APEX alternative or convert the code into apex.. i will be thankful
<?php function GET($url){ global $api_key, $password; $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, $api_key.':'.$password); curl_setopt($curl, CURLOPT_SSLVERSION,3); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt($curl, CURLOPT_URL, $url); $data = curl_exec($curl); curl_close($curl); return $data; }
Hi
I am giving an example of my running rest API.
I think you are asking for passing authentication variables into URL.
Regards,
Varun
All Answers
Hi
I am giving an example of my running rest API.
I think you are asking for passing authentication variables into URL.
Regards,
Varun
Thanks varun for your reply, it has solved my problem.. so nice of you