Hi, Guys, GetResponse has an example .php file for us to customize confirmation url. When visitors sign up the form, it will be taken to a submit page, which will remind the subscriber to check email box to confirm. After visitor clicked the confirm url, it will takes to the confirmation page. I need the script to do the following: A) after visitors signed up, it tells the user to check email for 5 seconds. After that, it will take the visitors to a new webpage, which can be customizable in the script. B) after visitors confirmed subscriptions, it prints congratulation message for 5 seconds before it redirect a new URL, which is also coded in the script. I have some php code which is extracted from the GR website. It tells an example how to build a customizable confirmation page. But I don't know how to... Here is the code <?php //function give back user information function write($type) { switch($type[site]) { //Error - don't field all forms case 'error': echo 'Please check your data and submit again. Thank you.'; break; //Submit - put e-mail, have to confirm case 'submit': echo 'Thank you for subscribing to my list. Please check your mailbox and confirm your subscription.'; break; //Confirm - confirm e-mail case 'confirm': echo 'Thank you for confirming your subscription.'; break; //Next - send e-mail from next day in camping case 'nextmessage': echo 'Please check your mailbox. We have just sent you a message.'; break; //Unsubscribe - unsubscribe from camping case 'unsubscribe': echo 'You have unsubscribed from our mailing list. We are sorry to see you go!'; break; //Duplicate email in camping case 'duplicateemail': echo 'You are already subscribed to this list.'; break; } //Put out data: name, e-mail, IP. echo '<br/>Name: '.$type[name].'<br/>E-mail address: '.$type[email].$type[mail].'<br/>IP address: '.$type[ip].'<br/>'; } //Choose type of geting information if(isset($_GET[site])) { write($_GET); } if(isset($_POST[site])) { write($_POST); } ?> Code (markup): I don't know how to integrate this piece of code with url re-direct. I know there is a meta redirect. However, that's in html not in php, and that can only redirect one URL? I need to redirect one of multiple urls according to the input type. Thanks David
Hmmm, I also am trying to look for someone that understands how to work with GetResponse in a similar way. I would like a script that works similar since almost 75% of the registrations I have received do not confirm - thus lost money. I would also like to have someone code the script to take the email address the subscriber enters into the form and have it pass to a new form of my choice pre-populating the new form with the email address. Anyone that understands co-regs etc knws what I am lokinging for. Any script gurus out there?
Redirects, the kind you're talking about, work by being part of the HTTP headers. That means they're sent before any text. (just like cookies) In other words, you can't show something for 5 seconds, then redirect, using redirects. The kind of redirect you want is probably called a "301" redirect. When the web browser queries a web server, the server responds with a number. Usually that's 200, which means OK. Sometimes, it's 404 (file not found). Sometimes, it's 301 -- moved permanently. you do that like this: <? header ('HTTP/1.1 301 Moved Permanently'); header ('Location: '.$location); exit; //you exit here because none of the code after this will get shown to the user. You don't want to waste server cycles executing it unless there's a really good reason to do this. ?> you can paste that code right before each "break" you have. note, though, that you can't "echo" anything before this.