New API v1.1 php code not working for my WordPress site (SSL enabled)



My WordPress site is SSL enabled. For testing purpose I have created a test page in root directory and used following code in that page:

<?php require "tmhOAuth/tmhOAuth.php"; require "tmhOAuth/tmhUtilities.php"; $consumerKey = "my_consumer_key"; $consumerSecret = "my_consumer_secret"; $userToken = "my_user_token"; $userSecret = "my_user_secret"; $screeName = "my_username"; $noOfTweets = 6; $tmhOAuth = new tmhOAuth(array( 'consumer_key' => $consumerKey, 'consumer_secret' => $consumerSecret, 'user_token' => $userToken, 'user_secret' => $userSecret, )); $code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array( 'screen_name' => $screeName, 'count' => $noOfTweets)); $response = $tmhOAuth->response; echo $response; ?>

I have not excluded any file from “tmhOAuth-master” folder, I have taken from github, just renamed it to “tmhOAuth” from “tmhOAuth-master”. When I run the test page, the page is showing - “Problem loading page, The connection was reset”. Here is the screenshot of the issue page -

Can anyone help please how to overcome this issue?



Found a solution using different code provided in twitter site. Thanks.


If you can add the link to your solution, this will help someone in the future with a similar problem.



  1. Download the zip folder from as said in
  2. Follow the steps given in