Retrieve Rows from a Data Extension
Use AMPscript contained in a landing page to interact with the web service API to retrieve rows from a data extension. For example, you can pull back information from a data extension to segment out subscribers who opened email from you within the past 6 weeks. This code returns the name and values of all information within a data extension.
Use this sample AMPscript as a model to create your own script.