简体   繁体   中英

Authenticate users using cURL for my login system on my site?

Maybe I don't understand cURL, so I'll ask. Any help is greatly appreciated. I am currently attempting to create a login system for my site. I am under the impression that using cURL is much more secure. So, I was wondering how i can restrict access and grant access to data depending on if the user is logged in like how you would with session variables such as:

if(isset($_SESSION['logged'])){ SHOW CERTAIN DATA } else {SHOW DIFFERENT DATA}

You are mistaken, cURL is not relevant to your problem. Just go ahead and use sessions .

cURL is a library to do HTTP requests, like a programmable "web browser" in itself. It's useful for fetching external resources from other servers, but it's not relevant for an authentication system. cURL is not a web server, it's a web browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM