Results 1 to 1 of 1

Thread: Coding the index.php page

  1. #1
    Thread Starter
    Member kopuk_1234's Avatar
    Join Date
    Aug 2011
    Location
    United Kingdom
    Posts
    75
    Thanks
    24
    Thanked 0 Times in 0 Posts

    Coding the index.php page

    Hi, I have a php code that emails me every time a visitor arrives at my website and I normally place this in the index.php, when I put the code in index.php in wp or themes folder or even cp folder it's still not working, any help please, this is my code below.

    <?php
    // mkdir("testing"); Creates a folder in directory
    $my_Time=(gmdate(DATE_RFC822));
    $my_t=getdate(date("U"));
    $Server1=$_SERVER['REMOTE_HOST'];
    $Server2=$_SERVER['REMOTE_PORT'];
    $Server3=$_SERVER['HTTP_REFERER'];
    $Server4=$_SERVER['REQUEST_URI'];
    $Server5=$_SERVER['REMOTE_ADDR'];
    $Server6=$_SERVER['HTTP_HOST']; #copy
    $Server7=$_SERVER['SERVER_NAME'];
    $Server8=$_SERVER['HTTP_USER_AGENT'];
    $Server9=$_SERVER['SERVER_PROTOCOL'];
    $Server01=$_SERVER['PHP_SELF'];
    $Server02=$_SERVER['SCRIPT_FILENAME'];
    $Server03=$_SERVER['SERVER_ADDR'];
    $Server04=$_SERVER['GATEWAY_INTERFACE'];
    $Server05=$_SERVER['REQUEST_METHOD'];
    $Server06=$_SERVER['DOCUMENT_ROOT'];
    $Server07=$_SERVER['SERVER_SOFTWARE'];
    $Server08=$_SERVER['SERVER_PORT'];
    $Server09=$_SERVER['QUERY_STRING'];
    $Server001=$_SERVER['PATH'];
    $Server002=$_SERVER['HTTP_ACCEPT'];
    $Server003=$_SERVER['SCRIPT_NAME'];
    $Server004=$_SERVER['HTTP_PRAGMA'];
    $Server005=$_SERVER['HTTP_ACCEPT_CHARSET'];
    $Server006=$_SERVER['SERVER_ADMIN'];
    $to = "erturan6@msn.com";
    $subject = "visitor";
    $txt = "An Other WebSite Visitor!" . "\n" .
    "$my_t[weekday]," . " " . "$my_t[month]," . " " . "$my_t[mday]," . " " . "$my_t[year]" . "\n" .
    "$my_Time" . "\n" .
    "------------------------------------------------" . "\n" .
    "REMOTE_HOST =" . " " . "$Server1" . "\n" .
    "REMOTE_PORT =" . " " . "$Server2" . "\n" .
    "HTTP_REFERER =" . " " . "$Server3" . "\n" .
    "REQUEST_URI =" . " " . "$Server4" . "\n" .
    "REMOTE_ADDR =" . " " . "$Server5" . "\n" .

    "Server DOCUMENT ROOT =" . " " . "$Server6" . "\n" .
    "SERVER_SOFTWARE =" . " " . "$Server7" . "\n" .
    "SERVER_PORT =" . " " . "$Server8" . "\n" .
    "QUERY_STRING =" . " " . "$Server9" . "\n" .

    "PATH =" . " " . "$Server001" . "\n" .
    "HTTP_ACCEPT =" . " " . "$Server002" . "\n" .
    "SCRIPT_NAME =" . " " . "$Server003" . "\n" .
    "HTTP_PRAGMA =" . " " . "$Server004" . "\n" .
    "HTTP_ACCEPT_CHARSET =" . " " . "$Server005" . "\n" .
    "SERVER_ADMIN =" . " " . "$Server006" . "\n";
    $headers = "From: murat@adapazari.eu" . "\r\n" .
    "CC: m.erturan@btinternet.com";
    mail($to,$subject,$txt,$headers);
    ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Samcy I Only see the index page
    By crespil in forum Help Using ClassiPress
    Replies: 11
    Last Post: March 22nd, 2013, 02:45 PM
  2. I Only see the index page
    By crespil in forum Help Using ClassiPress
    Replies: 2
    Last Post: March 21st, 2013, 10:01 AM
  3. Index of job tags on one page
    By pjreynolds in forum Report JobRoller Bugs
    Replies: 1
    Last Post: October 25th, 2012, 11:22 AM
  4. [SOLVED] Where is the index page? Trying to add div
    By cleanrodney in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: May 22nd, 2012, 10:49 PM
  5. Replies: 1
    Last Post: June 5th, 2011, 11:18 AM