View Single Post
  #4 (permalink)  
Old 03-24-2005, 10:24 AM
Biggles's Avatar
Biggles Biggles is offline
WebProWorld Member
 
Join Date: Aug 2004
Posts: 68
Biggles RepRank 1
Default

Thanks mikmik, this does look promising. I have tried it and it seems simple enough but i am getting these errors:

Quote:
Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /home/wingsof/public_html/amailzing.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /home/wingsof/public_html/amailzing.php:97) in /home/wingsof/public_html/amailzing.php on line 212
The code that these refer to is:

Quote:

// Write the start of the email body.

$message = "The following form was sent to you from your website!\n";
$message .= "-----------------------------------------------------------\n";
$message .= "Ip: $REMOTE_ADDR\n";
(line97)-> $message .= "Host: ".gethostbyaddr($REMOTE_ADDR)."\n";
$message .= "Browser: $HTTP_USER_AGENT\n";
$message .= "Referrer: $HTTP_REFERER\n\n";


line 212:
header("Location: $ref?message=$thankyou");


Anyone know whats wrong?

When i remove all the $message junk i get the email, the header message appears etc, all works fine.

However, the image i attach does not get sent, it knows the filename but cant show an image. Is there a fix anyone can show me? Do i need to upload them to the server first? ie, to MySQL if so how do i do it?

I am using Cpanel if that affects it, it is quite possible !


cheers
Reply With Quote