who is your host, i have never seen this format of hostinf before.
I am off to bed now, its 2355 GMT here but i will reply in the morning if noone else has fixed it b4 then.
Nyt.
Kyle
who is your host, i have never seen this format of hostinf before.
I am off to bed now, its 2355 GMT here but i will reply in the morning if noone else has fixed it b4 then.
Nyt.
Kyle
Hi diskhub,
I was wondering if you tell me what the @ before php functions does? I see it around a lot.
Thanks,
Larry
Hi Larry,
The @ symbol before a function is a error supressor e.g.
@mail(.........);
would stop:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in
from showing in the browser.
diskhub,
While i was writing the code in between u already posted your code.
also i provided two options , aryan u can use any of the code according to your requirement.
Fair enough :P
I really appreciate any help I can get! I sometimes struggle with code and I have no one to turn to because I have no coding friends. So once again thank you : )
did it work?
Hi Dave,
Like Larry said, you will need to use a web host as PHP mail proberly isnt enabled on your localhost.
Try something like:
<?php
$eol = "\r\n";
$to = ""; //the recipitant
$subject = ""; // the subject
$message = ""; // the message
$headers = "From: Your name<no-reply@your-domain>$eol";
$headers = "MIME-Version: 1.0$eol";
$headers .= "Content-type:text/html;charset=iso-8859-1$eol";
if(@mail($to, $subject, $message, $headers)) {
echo "SENT";
}
else {
echo "NOT SENT";
}
?>
my code is much more effective, why would you wan't to echo the whole string?
You probably guessed but I meant create and not creaye
Hi Drew,
Everyone makes spelling mistakes :P
if($response->IsApproved()) {
$eol = "\r\n";
$to = ""; //the recipitant
$subject = ""; // the subject
$message = ""; // the thank you message
$headers = "From: Drew Park <no-reply@your-domain>$eol";
if(@mail($to, $subject, $message, $headers)) {
header("Location: " . $GatewaySettings['PaymentApprovedPage']);
}
}
else {
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($response->GetField("ResponseReasonText")));
}
else {
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($transaction->GetErrorString($errorCode)));
}
?>
Hi,
First things first:
The cgi-bin (common gate interface bin) is a storage area for CGI/Perl scripts.
I am not sure why you are placing your PHP files in their, PHP is a server-side language and it should execute anywhere on a server with PHP enabled.
In regards to your 404 error, are you sure your files are located in the following location: /cgi-bin/php/myscript.php ?
Also /cgi-bin/ is a relative folder, if you like a kind of virtual folder. I would suggest you move your files outside this folder unless you have a valid reason for having them in there... I am sure they are not secure in their as the CGI-BIN is generally chmod'ed to 0777 (read, write, execute) persmissions.
Sorry for the long reply.
Kyle
<?php
$input = str_replace("£", "£", $input);
?>
where $input is the string you are entering into a text file.
Kyle
<?php
$url = "http://www.example.com/swf/";
$url .= $url . $_GET["code"];
?>
<object type="application/x-shockwave-flash" style="width:470px;height:320px;" data="<?php echo $url; ?>">
<param name="movie" value="<?php echo $url; ?>" />
<param name="quality" value="very high" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="" />
<param name="autoplay" value="true" />
<param name="allownetworking" value="internal" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
</object>
Kyle Hudson
Web Developer