Curl function Resolution Method

Source: Internet
Author: User
Curl function
function Search ($url, $curlPost) {
$cookiejar = Realpath (' cookie.txt ');
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_header, 0);
curl_setopt ($ch, Curlopt_returntransfer, 1);
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_postfields, $curlPost);
curl_setopt ($ch, Curlopt_cookiejar, $cookiejar); To callback a cookie
$data =curl_exec ($ch);
Curl_close ($ch);
return $data;

I want to use PHP to realize the external network machine through my Computer access to the intranet resources, one is my network login intranet Web site data interaction, and the other is through my php file with the Curl function when accessed, it hints about what files are missing. Does anyone know how to fix it? Curl PHP

Share to:

The mechanism of the IFRAME is
1. The browser gets the page that carries the IFRAME element
2. Browser Rendering page
3. Browser detects IFRAME elements
4. The browser re-requests the contents of the page contained in the IFRAME
5. Render the page that the IFRAME contains

Yes, you're here.
1. Browser initiated request Login!checklogin.action
2. Render Page
3. An IFRAME element is detected (for example, an IFRAME containing header.html)
4, Browser re-request header.html
5. Render header.html Page

Now, here's your case.
1, the browser on your host request, your host request intranet Login!checklogin.action
2. Browser Rendering page
3. The IFRAME element is detected
4. browser to you request header.html, where did you come to header.html?

So the solution is
1, the browser on your host request, your host request intranet login!checklogin.action, while modifying the IFRAME in the SRC from the original header.html changed to proxy. php?page=headerl.html
2. Browse Render Page
3. IFRAME Detected
4. Initiate a request agent for your host. php?page=header.html, Agent. PHP to get HTML content back in the intranet
5, render the actual content of header.html page
  • Related Article

    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: 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.