When User registered, I need to create one folder for that user in the server and create FTP for that folder in PHP.
How can I create FTP username, password and how it will assign that FTP to particular folder
I have access for WHM. Anyone guide me
I don't know much about WHM, but if it's a cloud solution it should provide an API.
I've found some more info about this here
https://documentation.cpanel.net/display/SDK/UAPI+Functions+-+Ftp%3A%3Aadd_ftp
then you'll probably need to learn the WHM api works
https://documentation.cpanel.net/display/SDK/Guide+to+WHM+API+1
and then you'll need how to use curl or some rest api client
http://php.net/manual/en/curl.examples-basic.php
again, I'm not sure which client is the best to use with WHM,
but I found this
https://github.com/tcdent/php-restclient
I'm not sure if I can help you here.
I followed below URL with Cpanel access, It working great :) https://forums.cpanel.net/threads/cpanel-api-to-create-ftp-accounts.144121/