url_is_accessable_via_ssl [ WordPress Function ]
url_is_accessable_via_ssl ( $url )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Determines if the blog can be accessed over SSL.
Determines if blog can be accessed over SSL by using cURL to access the site using the https in the siteurl. Requires cURL extension to work correctly.
Source
<?php
function url_is_accessable_via_ssl($url)
{
if (in_array('curl', get_loaded_extensions())) {
$ssl = preg_replace( '/^http:\/\//', 'https://', $url );
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ssl);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close ($ch);
if ($status == 200 || $status == 401) {
return true;
}
}
return false;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- #19555 (Deprecate url_is_accessable_via_ssl()) – WordPress Trac
Previous Ticket · Next Ticket →. Ticket #19555 (new defect (bug)). Opened 4 months ago. Last modified 7 weeks ago. Deprecate url_is_accessable_via_ssl() ...
core.trac.wordpress.org - WordPress › Support » xmlrpc.php?rsd shows up blank
He should find the function called url_is_accessable_via_ssl. In that function he should add one row so that: curl_setopt($ch, CURLOPT_URL, $ssl); ...
wordpress.org - #19552 (Split functions.php) – WordPress Trac
... wp_list_filter() wp_list_pluck() wp_maybe_load_widgets() wp_widgets_add_menu() wp_ob_end_flush_all() dead_db() absint() url_is_accessable_via_ssl() ...
core.trac.wordpress.org - PHPXRef 0.7 : WordPress : Detail view of functions.php
dead_db() absint() url_is_accessable_via_ssl() _deprecated_function() _deprecated_file() _deprecated_argument() _doing_it_wrong() is_lighttpd_before_150() ...
phpxref.ftwr.co.uk