How to check if curlSSL is working properly

How to check if curlSSL is working properly

cUrl is a library PHP uses to access HTTP based webservices and websites. At least some of these webservices and websites require you to use HTTPS (SSL) for security reasons.

Here is how to check if your webserver is correctly configured with CurlSSL.

Please create the .php file with this content (click “Text” or “Popup” and copy-paste the code to .php file ) anywhere on your server and open it from your browser.

<?php
function nxs_cURLTest($url, $msg, $testText){  
  $ch = curl_init(); 
  curl_setopt($ch, CURLOPT_URL, $url); 
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36"); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
  curl_setopt($ch, CURLOPT_TIMEOUT, 10); 
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  $response = curl_exec($ch); 
  $errmsg = curl_error($ch); 
  $cInfo = curl_getinfo($ch); 
  curl_close($ch); 
  echo "Testing ... ".$url." - ".$cInfo['url']."<br />";
  if (stripos($response, $testText)!==false) 
    echo "....".$msg." - OK<br />"; 
  else 
  { 
    echo "....<b style='color:red;'>".$msg." - Problem</b><br /><pre>"; 
    print_r($errmsg); 
    print_r($cInfo); 
    print_r(htmlentities($response)); 
    echo "</pre>There is a problem with cURL. You need to contact your server admin or hosting provider.";
  }
}

  nxs_cURLTest("http://www.nextscripts.com/", "HTTPS to NXS", "Social Networks");
  nxs_cURLTest("http://www.google.com/intl/en/contact/", "HTTP to Google", "Mountain View, CA");
  nxs_cURLTest("https://www.google.com/intl/en/contact/", "HTTPS to Google", "Mountain View, CA");
  nxs_cURLTest("https://www.facebook.com/", "HTTPS to Facebook", 'id="facebook"');
  nxs_cURLTest("https://graph.facebook.com/", "HTTPS to API (Graph) Facebook", 'get');  
  nxs_cURLTest("https://www.linkedin.com/nhome/", "HTTPS to LinkedIn", 'rel="canonical" href="https://www.linkedin.com/');
  nxs_cURLTest("https://twitter.com/", "HTTPS to Twitter", '<link rel="canonical" href="https://twitter.com');
  nxs_cURLTest("https://www.pinterest.com/", "HTTPS to Pinterest", 'content="Pinterest"');
  nxs_cURLTest("http://www.livejournal.com/", "HTTP to LiveJournal", '1999 LiveJournal'); 
?>

The correct result should look like this:

curlSSL

Live example:

http://www.nextscripts.com/curlssltest.php

If you get any errors, please contact your server admin or hosting provider.

Tutorials

How SNAP Sets Images

How SNAP Sets Images

All types of posts for Facebook, Google+, XING

All types of posts for Facebook, Google+, XING

How to format Facebook post with attached link

How to format Facebook post with attached link

All types of Facebook posts

How to format Facebook post with attached link

All types of posts to Facebook with video

All types of posts to Facebook with video

Why we don’t have a Twitter characters counter

Why we don’t have a Twitter characters counter.

Plugin Setup/Installation

All types of posts to Facebook with video

SNAP PRO Plugin Upgrade/Activation

All types of posts to Facebook with video

WP-Cron: Scheduling Tasks in WordPress

WP-Cron: Scheduling Tasks in WordPress

All Supported Networks

All types of posts to Facebook with video

How to check if curlSSL is working

WP-Cron: Scheduling Tasks in WordPress

How to completely remove SNAP

WP-Cron: Scheduling Tasks in WordPress

SNAP Features

Accounts

Most Major Social Networks are supported.

Settings

SNAP has a lot of settings to configure.

FIlters

Set what posts go to each network based on categories, tags, type, format and many more criteria.

}

Limit Autoposting Speed

Importing many posts at once? Not a problem. SNAP can query your autoposts and publish them one by one in defined time intervals.

Auto-import comments

Auto-import comments from Facebook and replies and mentions from Twitter as WordPress Comments

Custom URLs for AutoPosts

You can set a custom URL for the link shared by SNAP

l

Autopost New Blogposts

SNAP will automatically post your newly published blogposts (pages, events, products, custom post types) to all your defined social media accounts.

Auto re-post already existing posts.

SNAP can automatically re-post the already existing posts. SNAP can select specific posts for re-posting using filters.

Quick Post

Send a quick post to all configured social networks without creating a WordPress blogpost.

Post Types

SNAP can autopost blogposts, pages, WooCommerce products, and any other "Custom Post Types"

"Spin" message post templates

Ability to "Spin" message post templates

Emoji Support

Emoji Support

Format your posts

Format your posts using flexible replacement tags. make text posts, share links, or post images.

Hashtags

SNAP can post tags, tategories and any other custom WordPress taxonomies as Hashtags

Additional URL Parameters

Add additional parameters to the links posted by SNAP.

URL Shorteners

URL Shorteners: bit.ly, goo.gl, Rebrandly, YOURLS and built in WordPress URL Shortener

See what was posted

You can see the direct links to the posts published by SNAP on the "Post Edit" page

+

Export/Import Plugin settings

You Export and Import all plugin settings as backup or to move it to another site

SNAP Pro for Wordpress

Pro version upgrade adds the ability to configure more than one account for each social network and some additional features.

Get SNAP Pro

Latest Blogposts

Facebook app review

Facebook app review

We are getting a lot of questions about upcoming deadline for Facebook app review. People are asking what should we do. The honest answer would be: "No one has any idea". We submitted several apps for Facebook review using different ways of describing and explaining...

What happened with Facebook

What happened with Facebook

What happened with Facebook? Facebook made changes to it's API access policy on May 1st, 2018. As the result we introduced our own Premium API for Facebook.  We feel that we need to explain how exactly those changes affected SNAP. Since the beginning Facebook native...

Instagram issues

Instagram issues

Instagram made some very big changes to authentication process. About 70% of our users are affected by them. Before the changes the process was quite simple: Sometimes Instagram decided that login from SNAP is "unusual" and asked for confirmation. You just had to open...

New Release: SNAP Plugin for WordPress Version 4.1

New Release: SNAP Plugin for WordPress Version 4.1

SNAP for WordPress Version 4.1 has been released. This version adds support for WPML and Polylang in filters and one new network - Messenger Line. It also eliminates the necessity to "Save" WordPress post after making changes to SNAP message format. == Changelog == =...

SNAP for Wordpress

SNAP for Wordpress

SNAP for Wordpress MultiUser

SNAP for Wordpress MultiUser

SNAP API

SNAP API