Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 01-24-2010, 05:27 AM
  #1
videotoys
SuperHero (Level 14)
 
videotoys's Avatar
 
Join Date: Aug 2004
Location: Colorado
Posts: 298
iTrader: (0)
videotoys is on a distinguished road
Links Hits PHP script

I have been using this PHP script to send emails to me when people click on our sponsors links (Pop Up) and it was working fine for about 2 years or so now until I just transfered our web site to godaddy hosting. Is there a probably with the script or is it a setting I need to change on the host? thanks for any help

Here is the script:

HTML Code:
http://www.boulderchannel1.com/linkhits.php?address=http://www.newsite.com
Code:
<?php

// The following variables hold the obvious information.
$message = 'This email has been sent from Boulder Channel 1, to inform you that the '. $address . ' link has been clicked.';
$sendTo = "links@boulderchannel1.com";
$subject = "Boulder Channel 1, $address has been clicked!";
$from = "BoulderChannel1";

// This function actually sends the mail.
@mail($sendTo, $subject, $message,"From: $from\n");

// This function redirects the page to the one that the link was originally supposed to link to.
header("Location: $address");

?>
__________________
webmaster of www.boulderchannel1.com
videotoys is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-24-2010, 03:05 PM
  #2
videotoys
SuperHero (Level 14)
 
videotoys's Avatar
 
Join Date: Aug 2004
Location: Colorado
Posts: 298
iTrader: (0)
videotoys is on a distinguished road
Sorry HTML code is actually like this:

HTML Code:
<a href="linkhits.php?address=http://www.website.com" target="_blank">
If there's a better way to do this I'd love to know, I have been searching high and low to no avail. All I find is Google Analytics on how to track outbound links to a site, but I want those outbound link clicks to send me an email before going to the link.

I've tried changing the access rights as well. thinking that might work... Nothing.


Any other link tracking through emails scripts without using google analytics would be good help too. I found a few but not sure if they do quite what I want to.

Explination:

1. Someone clicks a link to an external site
2. the script sends me an email showing me a link has been clicked
3. then sends the user to that site, all in a new window.

Does this sound possible?
__________________
webmaster of www.boulderchannel1.com
videotoys is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-24-2010, 03:59 PM
  #3
tnowalk
Lord (Level 16)
 
tnowalk's Avatar
 
Join Date: Jul 2008
Location: New York
Posts: 554
iTrader: (0)
tnowalk will become famous soon enoughtnowalk will become famous soon enough
Just a quick thing before I go, on your old server you probably had global variables on, and when you switched to go daddy it with an upgraded version of PHP, global variables is turned off. I see that in your script you call to $address but not $_GET['address'] which is what makes me think that. You can add this to the top: $address = $_GET['address'] and that should take care of your problem temporarily. When I get home I can see if i can find a good link tracker and post back

Best Regards,
Trevor

Comments on this post
videotoys agrees: EXCELLENT
__________________
http://www.tkm-designs.com
tnowalk is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-24-2010, 04:23 PM
  #4
videotoys
SuperHero (Level 14)
 
videotoys's Avatar
 
Join Date: Aug 2004
Location: Colorado
Posts: 298
iTrader: (0)
videotoys is on a distinguished road
SWEET! I Think that actually fixed my problem completly.

Thanks so much I spent all day trying to find a tracker that did what this script was doing but they all needed to install databases or were only for text links.

Thanks again, LOTS! Made my day!
__________________
webmaster of www.boulderchannel1.com
videotoys is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-24-2010, 05:47 PM
  #5
tnowalk
Lord (Level 16)
 
tnowalk's Avatar
 
Join Date: Jul 2008
Location: New York
Posts: 554
iTrader: (0)
tnowalk will become famous soon enoughtnowalk will become famous soon enough
You are most welcome
__________________
http://www.tkm-designs.com
tnowalk is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:43 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.