Hello,
I am trying to get HTML source of my vendor website's URL using cURL but I am not getting correct result, the output is coming only Header Template and Footer Template. I have given code below which I m using. Please help me out to get correct result.

Thanks in advance for prompt reply..

Code:

<?php

    $categoryURL = "https://store.schoolspecialty.com/OA_HTML/ibeCCtpSctDspRte.jsp?sname=School+Supplies&rootSection=95187&section=95187&minisite=10206&JServSessionIdrootw218242lweb2002=j9ywfqdzq1.rN8Lc38OaALRnk8Ma30M/Bbxo6XJp7bKnkbDmkLOsgTxpQOUtxCLbx0Kbe--";
    $postFields = "query=&resultsPerPage=&sort=null&command=&do=showSec&searchContext=&type=leafSection&"."section=95187&rootSection=95187&minisite=10206&sname=School%20Supplies&facetName=&facet=&facetValue=&removeFacet=";

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $categoryURL);
    curl_setopt($curl, CURLOPT_USERAGENT,_curlOptUserAgent);
    curl_setopt($curl, CURLOPT_POST,1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl, CURLOPT_REFERER, $referrer);
    curl_setopt($curl, CURLOPT_COOKIEFILE,_spiderCookieJarFileName);
    curl_setopt($curl, CURLOPT_COOKIEJAR, _spiderCookieJarFileName);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);
    $pageHTML = curl_exec($curl);
    curl_close($curl);

?>

It is possible that the rest is loaded dynamically, which is something cUrl cannot get.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.