aiopa
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress PDF Templates] stream_socket_client()Your issue is not with this pluggin 😛
Forum: Plugins
In reply to: [WordPress PDF Templates] stream_socket_client()File:
/wp-content/plugins/wp-pdf-templates/wp-pdf-templates.phpAnd remember to backup this file!!
Forum: Plugins
In reply to: [WordPress PDF Templates] stream_socket_client()So i solved my problem by using cURL, I added this
function curl_get_contents($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; }And changed
$html = file_get_contents( $link, false, $context );$html = file_get_contents( str_ireplace( 'https://', 'http://', $link ), false, $context );$html = file_get_contents( $link , false, $context );To
$html = curl_get_contents( $link );$html = curl_get_contents( str_ireplace( 'https://', 'http://', $link ) );$html = curl_get_contents( $link );Forum: Plugins
In reply to: [WordPress PDF Templates] stream_socket_client()Found some more Errors:
/pdf
gives error:
Failed to load PDF document/pdf-preview
gives error:Warning: file_get_contents(https://localhost/produkt/twizy-leasing/?pdf-template): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /var/www/xxx/dist/wp-content/plugins/wp-pdf-templates/wp-pdf-templates.php on line 243
Warning: file_get_contents(http://localhost/produkt/twizy-leasing/?pdf-template): failed to open stream: Connection timed out in /var/www/xxx/dist/wp-content/plugins/wp-pdf-templates/wp-pdf-templates.php on line 247
Warning: file_get_contents(https://xxx/produkt/twizy-leasing/?pdf-template): failed to open stream: Connection timed out in /var/www/xxx/dist/wp-content/plugins/wp-pdf-templates/wp-pdf-templates.php on line 254