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.

FIlters

Set what posts go to each network based on categories, tags, types ….

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

"Spin" message post templates

Ability to “Spin” message post templates

Settings

SNAP has a lot of settings to configure.

Auto re-posting of the old posts

SNAP can auto re-post the alrrady existing posts

URL Shorteners

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

+

Export/Import Plugin settings

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

Choose what image to use

You can choose what image to use with SNAP post

Message Formatting

How to format your posts.

Post Types

SNAP can autopost blogposts, pages, woocommerce products, and any other “Custom Post Types”

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.

See what was posted

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

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

SNAP WordPress Plugin Version 4 Beta 1

SNAP WordPress Plugin Version 4 Beta 1

The final release date for the long awaited SNAP WordPress Plugin Version 4 is set for October 1, 2017. The first closed beta version is available today. The first public beta version will be available on August 31, 2017. Here is the full release schedule: Version 4...

XING Autoposting – New NextScripts Premium API

XING Autoposting – New NextScripts Premium API

XING has recently decided to discontinue its official free API. Today we are introducing the better alternative - new NextScripts Premium API for XING. Unlike the API from XING that was able to make posts to profiles only, NextScripts Premium API for XING can post to...

New Release: SNAP for WordPress Version 3.7.10.Beta

New Release: SNAP for WordPress Version 3.7.10.Beta

UPDATE (Jan 20, 2017). Version 3.7.11 has been released to WordPress.org plugin repository. it has all code from this beta along with some fixes. Please update your plugin. ------------- New beta version is available for download. Two most popular networks Facebook...

New Release: SNAP for WordPress Version 3.7

New Release: SNAP for WordPress Version 3.7

SNAP for Wordpress Version 3.7 has been released. This version adds support for two new networks. 1. Weibo. Biggest Chinese Microblogging Service. You can post your messages and images. 2. MailChimp. One of the most popular email marketing tools. You can send your...

SNAP for Wordpress

SNAP for Wordpress

SNAP for Wordpress MultiUser

SNAP for Wordpress MultiUser

SNAP API

SNAP API