Jump to content

Search the Community

Showing results for tags 'curl headers ssl https'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hey All, I previously asked this question on stackoverflow to no avail: http://stackoverflow.com/questions/19734022/curl-returns-no-result-with-https-header-read It reads: I've got an issue with cURL here. I'm attempting to retrieve a status code from a webpage and I simply cannot with my internal URL. It uses Self-Signed Certs. performing the cURL operation below simply results in a boolean false value. If I attempt to use cURL through my linux box, it correctly returns the header. (as expected) If I attempt to use cURL through PHP with a URL such as https://www.google.com, it successfully returns a header (as expected) If I attempt to use cURL through PHP with a URL such as https://www.google.com while taking out the SSL_VERIFY options, it does not return a header (as expected) Can anyone explain this behaviour? function get_http_response_code($url) { $url = 'https://host.name.com/test.html'; $headers = getheaders($url); //echo($headers); echo(substr($headers,9,3)); } function getheaders($url) { $c = curl_init(); //echo($url); curl_setopt($c, CURLOPT_URL, $url); //curl_setopt($c, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($c, CURLOPT_HEADER, true); curl_setopt($c, CURLOPT_NOBODY, true); // curl_setopt($ch, CURLOPT_SSLVERSION, 3); // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); $headers = curl_exec($c); //echo(var_dump(curl_error($headers))); //echo(var_dump($headers)); curl_close($c); return $headers; } Thanks again, -Mat
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.