php - CURL Authentication being lost? -
I am correcting login via the kernel. I have a variable that I am using to display the returned HTML, and it is returning to my user control panel as though I am logged in.
After authentication, I want to communicate with variables with a form on another page; But for some reason an HTML version of the HTML header is returning an unauthorized version (such as the original authentication never happened.)
I have a cookies.txt file with 777 permissions, and when I certify I tried to get the contents of the same page shown and it seems that I am losing any affiliate session / cookie data somewhere on the way.
Here is my curl file -
Curl, CURLOPT_HTTPHEADER, $ header); Curl_setopt ($ this-> Curl, CURLOPT_COOKIEJAR, $ this-> Cookies); Curl_setopt ($ this-> Curl, CURLOPT_COOKIEFILE, $ this-> Cookies); Curl_setopt ($ this-> Curl, CURLOPT_AUTOREFERER, true); Curl_setopt ($ this-> Curl, CURLOPT_COOKIESESSION, true); Curl_setopt ($ this-> Curl, CURLOPT_FOLLOWLOCATION, true); Curl_setopt ($ this-> Curl, CURLOPT_RETURNTRANSFER, is true); } Find function ($ url) {$ this- & gt; Curl = curl_init ($ url); $ This- & gt; Set-up (); Return $ $-> request (); } GetAll function ($ reg, $ str) {preg_match_all ($ reg, $ str, $ matches); Returns $ matches [1]; } Festival postForm ($ url, $ fields, $ referer = '') {$ this- & gt; Curl = curl_init ($ url); $ This- & gt; Set-up (); Curl_setopt ($ this-> Curl, CURLOPT_URL, $ url); Curl_setopt ($ this-> Curl, CURLOPT_POST, 1); Curl_setopt ($ this-> Curl, CURLOPT_REFERER, $ referer); Curl_setopt ($ this- & gt; curl, CURLOPT_POSTFIELDS, $ fields); Return $ $-> request (); } Function getInfo ($ info) {$ info = ($ info == 'last')? Curl_getinfo ($ this-> Curl, CURLINFO_EFFECTIVE_URL): curl_getinfo ($ this-> Curl, $ info); Return $ info; } Function request () {return curl_exec ($ this-> curl); }}? & Gt;
And this is my curl.php file -
By & lt;? $ Html = $ curl- & gt; Postform ('http://www.site.com/index.php','nid=443&sid=733005&tab=post&eval=yes&ad=&MAX_FILE_SIZE=10000000&IP = 63.225.235.30', 'Http: //www.site.com/public/member/signin'); $ Echo echo; // This will show you the HTML of the existing page and will you log in? & Gt;
Any ideas?
Error, please tell us whether the server is using the authentication scheme All plans do not use cookies Does.
Comments
Post a Comment