In PHP, the file_get_contents function captures https address errors (two methods). The burpsuite captures https_PHP tutorial.

Source: Internet
Author: User
In PHP, the file_get_contents function captures the https address (two methods) and burpsuite captures https. In PHP, the file_get_contents function captures the https address error solution (two methods). burpsuite captures https Method 1: In php, crawls the https website and prompts the following error content: in PHP, the file_get_contents function captures the https address (two methods) and burpsuite captures the https address.

Method 1:

In php, when an https website is crawled, the following error message is displayed:

Warning: file_get_contents () [function. file-get-contents]: failed to open stream: Invalid argument in I: Webmyphpa. php on line 16

Open the php. ini file and find; extension = php_openssl.dll, remove double quotation marks ";". restart the web server.

If the apache server is used, the mod_ssl module test can be enabled at the same time.

If it is not convenient to modify the server configuration, you can use the following functions to solve the problem:

Sample code:

<? Php // file_get_contents captures the https address content function getCurl ($ url) {$ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL, $ url); curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, false); $ result = curl_exec ($ ch); curl_close ($ ch ); return $ result ;}

Method 2:

In php, when the file_get_contents function is used to capture the website content starting with https, an error warning similar to the following occurs:

Warning: file_get_contents (https: // 127.0.0.1/index. php) [function. file-get-contents]: failed to open stream: Invalid argument in E: \ website \ blog \ test. php on line 25

Open php. ini and find; extension = php_openssl.dll, remove double quotation marks ";". restart the web server.

Apache can enable the mod_ssl module for testing at the same time.

The above content is shared with you two ways to solve the problem of the file_get_contents function grabbing https address error in PHP. I hope it will be helpful to you.

Refer (two methods), burpsuite captures https Method 1: In php, capture the https website and the following error message is displayed :...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.