Oct 20, 2019 09:46 PM
(This post was last modified: Oct 20, 2019 09:47 PM by linhtinh.)
I'm trying use curl for login hulu.com and im use "preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $result, $matches);" for get cookies response
How can i get value cookie "bm_sv
value : 0AB7970228D4EDB3987C522EE182FE…MzpzebJKOyV4Qt9t54sLVSCfsVQ==" ,response of curl only show "_tcv" and "_h_csrf_id". Can i get solution for this case ?
Don’t. Use curl cookie jar
i dont use cookies jar my friend .Here is my curl :
"curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, random_uagent());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$result = curl_exec($ch);
preg_match_all('/^Set-Cookie:\s/mi', $result, $matches);"
Only response _tcv and _h_csrf_id ,no see bm_sv value cookie :(
(Oct 22, 2019 12:46 AM)linhtinh Wrote: i dont use cookies jar my friend .Here is my curl :
"curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, random_uagent());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$result = curl_exec($ch);
preg_match_all('/^Set-Cookie:\s/mi', $result, $matches);"
Only response _tcv and _h_csrf_id ,no see bm_sv value cookie :( No.
USE COOKIE JAR. It’s made fo campuses it all. You’re making it way harder than it has to be
(Oct 23, 2019 09:19 AM)Charger Wrote: No.
USE COOKIE JAR. It’s made fo campuses it all. You’re making it way harder than it has to be
I think what OP needs to understand, it's that COOKIE_JAR is a curl option.
How about that https://hotsource.dev/2019/04/29/php-cur...-sessions/
“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
Oct 23, 2019 02:51 PM
(This post was last modified: Oct 23, 2019 03:31 PM by Charger.)
(Oct 23, 2019 02:48 PM)newQuery Wrote: I think what OP needs to understand, it's that COOKIE_JAR is a curl option.
How about that https://hotsource.dev/2019/04/29/php-cur...-sessions/
He needs to do anything but try to capture it with Regex. That ain’t gonna work well.
Nachfolger come take a look
|