I use cURL to enter the site, but I do not know how to get / use the cookies that I receive.
Does anyone have any ideas?
thanks
http://ask.metafilter.com/18923/How-do-you-handle-authentication-via-cookie-with-CURL
Perhaps this example will help ...
#!/bin/bash COOKIE_FILE="cookie.tmp" MAIN_URL="http://localhost:8080/monitor" if [ -e $COOKIE_FILE ] ; then rm $COOKIE_FILE fi curl -d "j_username=user&j_password=pass" -c $COOKIE_FILE "$MAIN_URL/j_spring_security_check" DATA=`curl -b $COOKIE_FILE "$MAIN_URL/host/list.json"` curl --get -b $COOKIE_FILE "$MAIN_URL/host/addHost.json?newHostAddress=192.168.77.197&newHostPort=9990" rm $COOKIE_FILE
curl_setopt($curl, CURLOPT_COOKIE, 'someKey=' . $_COOKIE['someVal . '; path=/');
cookie . cookie, php.net " cookie" cookie , "cookie jar"
Source: https://habr.com/ru/post/1724948/More articles:сжимать файл на стороне клиента - javascriptDeleting rows causes a lock timeout - mysqlIs there a good semaphore for XNA on the XBox 360? - multithreadingDetecting TWebBrowser Update Event in Delphi 2009 - refreshapache ivy - what is in ivysettings.xml - antPHP and cURL cookies - phpHow does Casting work in PHP? - castingUITableViewCell lock shortcut icon - iphoneHow to bind SQL variables in php? - phphtml page does not receive cookies via libcurl - phpAll Articles