Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function hello_world ()
- {
- $current_dir = getcwd ();
- echo "Hello, World: $current_dir\n";
- $result = test_ssl ();
- if ($result == false)
- echo "Very poor\n";
- }
- function test_ssl ()
- {
- $ch = curl_init ();
- curl_setopt ($ch, CURLOPT_URL, "https://api.twitter.com");
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, true);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt ($ch, CURLOPT_CAINFO, getcwd () . "/api.twitter.com");
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec ($ch);
- curl_close ($ch);
- return $result;
- }
- hello_world();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement