Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,883 members, 7,802,853 topics. Date: Friday, 19 April 2024 at 11:20 PM

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 (1687 Views)

Pls Help Me With This Php Code / Help On Php Code For A Dice Game / Help With This Php Code. (2) (3) (4)

(1) (Reply)

I Need Help With This Php Code For Email And Sms Autoresponse by charliebiz(m): 3:49pm On Nov 08, 2010
Webmasters, longes tyme. Since I was banned from posting cry ova 9 months ago
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?

(1) (Reply)

Help on C Programming / Do Nigerians Still Use 2go Like Others Chatting Apps? / Must Everything Go The Web Way?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.