Simple registration script help needed

OldDude

New member
Aug 18, 2009
18
0
0
I need a script (php preferred) that works with an affiliate company's supplied API. Very basic, 2 field's... User Name and E-Mail are passed over along with the registering user's IP address and API login, password and campaign ID.

Data must be sent via http POST to http:/api_join_basic.php
If the account is successfuly created, an 'OK' message is returned, otherwise an error message is returned explaining what went wrong.

I need the script to validate the username and email and post to the affiliate API. Then read the response from the affiliate (either OK or error message) and redirect the user to a specific page based upon the response page of the API.


Below are the required fields, type, description
api_username char(15) required API authentication username.
api_password char(15) required API authentication password.
f_email char(150) required The email address for the new signup.
f_username char(15) required The username for the new signup. Minimum 3 letters.
ip ip address required T The IP address of the user that signs up (X.X.X.X).
campaign_id integer required The campaign ID where the signup should be tracked.

I've tried several variations but can't get any script I make to work. I can make a script post but don't know enough to write the code to read the response and redirect to a page.

Any help would be appreciated.

Thanks