How can i get all customer list in php curl

using cursor i am able to get next page of customers and it return 20 records. how can i get all customers. can help me getting the cursor looping idea