I Need Help With This Php Code For Email And Sms Autoresponse - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › I Need Help With This Php Code For Email And Sms Autoresponse (1855 Views)
1 Reply
| I Need Help With This Php Code For Email And Sms Autoresponse by charliebiz(op): 3:49pm On Nov 08, 2010 |
Webmasters, longes tyme. Since I was banned from posting I left nairaland for good bt wat gud will dat do 2 me wen I nid d help of code masters. I have an email autoresponse that I signed up for and a company that those sms autoresponse. They (the two sites) gave me an HTML form with their different POST value/url. I created my own form and post address/url. On the page where the URL is being posted(I used curl), I created the required value that were embedded in the two different forms leaving out the ones that will be filled Now my problem The code worked wen I tried it but it only works with the sms autoresponder while that of the values for the email autoresponder those not work. I echoed the statement at the end of the code and I got the values but still it is not being posted. Any help This is how the code and how it works form - > destination page - > database(sms and email) <?php $url = 'http://www.gogvo.com/subscribe.php'; $url1 = 'http://www.smshulk.com/sub_add.php'; $name = $_POST['FullName']; $email = $_POST['Email']; $phone = $_POST['Custom1']; $redirect = 'http://www.mygsmmoney.com/cam.html'; $gvo = array('Camera','Phone','Money'); $campname = implode(" ", $gvo); $gogvo = array( 'Campaign'=>$campname, 'FormId'=>25503, 'PassFormData'=>1, 'TrackerName'=>noworry, 'AffiliateName'=>noworry, 'FullName'=>$name, 'Email'=>$email, 'Custom1'=>$phone ); //build the urlencoded data $postvars=''; $sep=''; foreach($gogvo as $key=>$value) { $postvars.= $sep.$key.'='.$value; $sep='&'; } //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($gogvo)); curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars); //execute post $result = curl_exec($ch); //close connection curl_close($ch); echo $postvars; ?> and here is the code I got for the form <form method="post" action="redirectto.php"> <input type="hidden" name="Campaign" value="Camera Phone Money" /> <input type="hidden" name="FormId" value="25503" /> <input type="hidden" name="PassFormData" value="1" /> <input type="hidden" name="TrackerName" value="cameraphone" /> <input type="hidden" name="AffiliateName" value="internet" /> <table align="center"> <tr> <td>Full Name:</td><td><input type="text" name="FullName" /></td> </tr> <tr> <td>Email:</td><td><input type="text" name="Email" /></td> </tr> <tr> <td>Phone:</td><td><input type="text" name="Custom1" /></td> </tr> <tr> <td align="center" colspan="2"> <input type="submit" value="Submit" /></td> </tr> </table> <img src="http://www.gogvo.com/show_form.php?id=25503" /> </form> What am I doing wrong? |
Pls Help Me With This Php Code • Help On Php Code For A Dice Game • Help With This Php Code. • 2 • 3 • 4
What Can I Do With Command Prompt? • I Decided To Move My Account • 50 Seasoned Programmers Needed Asap