Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
could someone tell me why this script doesnt work.
Old 09-01-2008, 09:52 AM could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
I found this script free on the web, to email me information.... but it doesnt seem to work.

Simple as it is, i cant figure out why.

I recieve the email, but it doesn't show any information. just
A
B
C ......


PHP Code:
$A $HTTP_USER_AGENT;
$B $HTTP_REFERER;
$C $SERVER_PROTOCOL;
$D $HTTP_CONNECTION;
$E $SERVER_SIGNATURE;
$F $HTTP_REFERER;
$G $REMOTE_USER;
$H $REMOTE_HOST;
$I $QUERY_STRING;
$J $SERVER_ADDR;
$K $HTTP_ACCEPT_LANGUAGE;
$L $HTTP_ACCEPT;
$M $HTTP_USER_AGENT;
$N $GATEWAY_INTERFACE;
$O $HTTP_HOST;
$P $SERVER_SOFTWARE;
$Q $SERVER_ADMIN;
$R $REMOTE_ADDR;
$S $SCRIPT_NAME;
$T $HTTP_X_MCPROXYFILTER;
$U $USER;
$V $SERVER_NAME;
$W $DOCUMENT_ROOT;
$X $REQUEST_URI;
$Y $HTTP_COOKIE;
$Z $REMOTE_PORT;
$ip =$REMOTE_ADDR;
$admin_email "webmaster@teamspeakdisplay.com";
$bcc_email "robert.morrow@ns.sympatico.ca";
$company_name "Site Submission";
$to $admin_email;
$subject 'Web Page Visitor';
$body .= "IP Address: $ip has visited this web page\n\n";
$body .= "A: $A\n";
$body .= "B: $B\n";
$body .= "C: $C\n";
$body .= "D: $D\n";
$body .= "E: $E\n";
$body .= "F: $F\n";
$body .= "G: $G\n";
$body .= "H: $H\n";
$body .= "I: $I\n";
$body .= "J: $J\n";
$body .= "K: $K\n";
$body .= "L: $L\n";
$body .= "M: $M\n";
$body .= "N: $N\n";
$body .= "O: $O\n";
$body .= "P: $P\n";
$body .= "Q: $Q\n";
$body .= "R: $R\n";
$body .= "S: $S\n";
$body .= "T: $T\n";
$body .= "U: $U\n";
$body .= "W: $V\n";
$body .= "X: $W\n";
$body .= "Y: $X\n";
$body .= "Z: $Y\n";
$headers "From: $company_name <$admin_email>\r\n"
$headers .= "Bcc: $bcc_email";
// $headers .= "X-Sender: <$admin_email>\n";
$headers .= "X-Mailer: PHP\n"
mail ($to$subject$body$headers); 
BigJohnny is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-01-2008, 10:36 AM Re: could someone tell me why this script doesnt work.
Novice Talker

Posts: 9
Trades: 0
Try
PHP Code:
$ip =$_SERVER['REMOTE_ADDR']; 
__________________

Please login or register to view this content. Registration is FREE
propress is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 11:13 AM Re: could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
ok......do i do that for every variable?
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 12:31 PM Re: could someone tell me why this script doesnt work.
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Script wont work under PHP 4.2.0 and above where default for register globals is off.

Can be turned on but not recommended due to security issues.

As your script seems to be interested only with the contents of the $_SERVER array then you could do a simple foreach loop.

PHP Code:
$body "";
foreach (
$_SERVER as $key => $value) {
   
$body.=$key." is ".$value."\n";
  } 
$admin_email "webmaster@teamspeakdisplay.com";
$bcc_email "robert.morrow@ns.sympatico.ca";
$company_name "Site Submission";
$to $admin_email;
$subject 'Web Page Visitor';
$headers "From: $company_name <$admin_email>\r\n"
$headers .= "Bcc: $bcc_email";
// $headers .= "X-Sender: <$admin_email>\n";
$headers .= "X-Mailer: PHP\n"
mail ($to$subject$body$headers); 

Last edited by maxxximus; 09-01-2008 at 12:37 PM..
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 12:45 PM Re: could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
wow..... that seems to have worked.... now im wondering, is there anyway i could cleanup the output.... this is the email i recieve now

Quote:
UNIQUE_ID is TCT0S9BGT2AAAEv5hiYAAAA0
HTTP_HOST is www.teamspeakdisplay.com
HTTP_USER_AGENT is Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
HTTP_ACCEPT is text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE is en-us,en;q=0.5
HTTP_ACCEPT_ENCODING is gzip,deflate
HTTP_ACCEPT_CHARSET is ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE is 300
HTTP_CONNECTION is keep-alive
HTTP_REFERER is http://www.teamspeakdisplay.com/HTML...rong_code=true
HTTP_COOKIE is tntcon=1d936dadf30010a96155a780553d5513a4xn; __utmc=79014545; __utma=79014545.1322100929353083000.1219884953.122 0279559.1220287445.22; __utmz=79014545.1220242366.18.2.utmcsr=aboutus.org |utmccn=(referral)|utmcmd=referral|utmcct=/teamspeakdisplay.com; __utmb=79014545.1.10.1220287445
CONTENT_TYPE is application/x-www-form-urlencoded
CONTENT_LENGTH is 98
PATH is /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
SERVER_SIGNATURE is <address>Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8 Server at www.teamspeakdisplay.com Port 80</address>

SERVER_SOFTWARE is Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
SERVER_NAME is www.teamspeakdisplay.com
SERVER_ADDR is 208.70.79.96
SERVER_PORT is 80
REMOTE_ADDR is 99.254.68.135
DOCUMENT_ROOT is /home/tdisplay/public_html
SERVER_ADMIN is webmaster@teamspeakdisplay.com
SCRIPT_FILENAME is /home/tdisplay/public_html/HTML/Includes/Mailer.php
REMOTE_PORT is 3300
GATEWAY_INTERFACE is CGI/1.1
SERVER_PROTOCOL is HTTP/1.1
REQUEST_METHOD is POST
QUERY_STRING is
REQUEST_URI is /HTML/Includes/Mailer.php
SCRIPT_NAME is /HTML/Includes/Mailer.php
PHP_SELF is /HTML/Includes/Mailer.php
REQUEST_TIME is 1220287385
argv is Array
argc is 0
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 09-02-2008, 06:44 PM Re: could someone tell me why this script doesnt work.
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Just tell us what is the output you would like to see, and we will try to provide you the script
Give as an output example...
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
Old 09-02-2008, 06:49 PM Re: could someone tell me why this script doesnt work.
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Deleted: duplicated post, sorry
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
Old 09-04-2008, 07:41 PM Re: could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
Well, i would prefer if someone would give me a detailed description of how to do it/syntax, as opposed to doing it for me... I would like to learn this stuff, and not have to rely on others.

This is the info I think I would like to see, both from the info above and otherwise.

Http User agent
Http Referer
Script Filename
Request URI
Script Name
User IP
User Host

That stuff should allow me to use the script just about anywhere i might need to get some user info.
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 09-07-2008, 09:22 PM Re: could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
so is there a solution to my problem?
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 07:11 AM Re: could someone tell me why this script doesnt work.
Experienced Talker

Posts: 42
Trades: 0
better give the script so we can try it and help you...
__________________

Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE

extraspecial is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 05:39 PM Re: could someone tell me why this script doesnt work.
Super Talker

Posts: 119
Trades: 0
the script is here........in the post above.....
BigJohnny is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to could someone tell me why this script doesnt work.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33075 seconds with 12 queries