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
Old 07-24-2008, 06:51 PM php or javascript?
Skilled Talker

Posts: 94
Trades: 0
I am looking for a script that will send an email when a link is clicked.

Basically I have a page where there is a link to another website, and when some one clicks on that link and goes to that site, I need a script that will send an email saying that some one has clicked on the link.

I am not sure if this can be done with php or if it has to be done with java.

I am hoping some one will know and could recommend something.

thank you.
IG88 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-24-2008, 08:21 PM Re: php or javascript?
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
Just to let you know, Java and JavaScript are two different languages, although it's easy to get confused because of the similar names.

To answer your question, you would probably have to use both JavaScript and PHP to do what you want. JavaScript would detect if the link has been clicked and PHP would send the email. However, you might want to reconsider whether or not this is something you really want to do. Do you really want an email EVERY time someone clicks on a link? Why not just store the number of clicks in a database or in a text file instead of sending an email?
__________________
Want new web resources every day? - Follow me on
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
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 07-24-2008, 11:00 PM Re: php or javascript?
Skilled Talker

Posts: 94
Trades: 0
Ah, yes you are right, and I knew that, but I guess it just slipped out.

The reason I need for this to work this way is because I am building a directory site and I have companies that pay to be listed. Therefore this will be very good for business if I can show to my paying clients that people are visiting their links.

I came across a site that does this, and looking at the source I found the code below. Perhaps this could lend an idea...

Code:
<tr valign="top"><td width="19%"><b><font size="2"
face="Arial">Website:</font></b></td><td width="81%">
<font size="2"face="Arial">
<Ahref="javascript:document.forms[0].submit();"
onMouseOver="window.status='Visit our Website';return true;"
onMouseOut="window.status='';return true;"
target="_top"><big><b>www.sitename.com</b></big></a>
</font></td></tr>
</table>
</td></tr>
</table>
<br><br>

</script>
Does this tell you anything?
IG88 is offline
Reply With Quote
View Public Profile
 
Old 07-25-2008, 12:12 AM Re: php or javascript?
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
You still may want to reconsider, especially if it is clients that are getting the emails. I know that if I signed up for a paid directory, I wouldn't want a new email everytime someone clicked on the link. What I would like instead is to be able to either see right next to the link how many times it's been clicked or, barring that, to be able to log in and see how many times it's been clicked. But an email would quickly cause you to lose clients, in my opinion. For an example of a site like this, check out http://www.hotscripts.com.
__________________
Want new web resources every day? - Follow me on
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
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 07-25-2008, 04:00 AM Re: php or javascript?
Average Talker

Posts: 16
Trades: 0
Hi,

You can do the tracking entirely in php at the backend, which will cloak the link as well. What I do is I assigned a unique id and counter to each link, and the counter will increase on each click.
You can find a demo here: http://www.netraits.com/features/cloak-url

I agree with VirtuosiMedia that it is not a good idea to send your clients an email on every clicks, will surely piss them off.
Instead, I gave my clients access to a page that shows them the report.
__________________

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


netraits is offline
Reply With Quote
View Public Profile Visit netraits's homepage!
 
Old 07-25-2008, 07:26 AM Re: php or javascript?
Skilled Talker

Posts: 94
Trades: 0
I suppose you both may be right.

What about an email that would go out once a week and tell the members how many views they have received that week. However it would only go out if they have received at least 1 view.

I definitely want to send out emails. Even if it is once a week or less. It is important for me to keep in the forefront of the clients minds. If they never get a reminder then they may not frequent the site and then loose faith as to if it is worth their money.

But even with the idea above, it is not like they will get tons of emails every day. It is a very specific industry. It is only wedding related vendors, so they will not get overloaded with emails. This other site I mentioned that uses this does very well, and maybe the solution would just be to have an option for the members to choose not to receive the emails.
IG88 is offline
Reply With Quote
View Public Profile
 
Old 07-25-2008, 01:46 PM Re: php or javascript?
Skilled Talker

Posts: 77
Name: Bill Benson
Location: Florida
Trades: 0
Why not put a few links in the email that allows the user to select email frequency?
bill benson is offline
Reply With Quote
View Public Profile
 
Old 07-25-2008, 04:15 PM Re: php or javascript?
Skilled Talker

Posts: 94
Trades: 0
Yes, having that as part of the script would be great. I could just have the option under their account page where they can choose as well.

But before I start adding features I need to locate this script. I am pretty sure it is out there, but where? I am not even sure how to search for a script like this.
IG88 is offline
Reply With Quote
View Public Profile
 
Old 07-25-2008, 05:08 PM Re: php or javascript?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.highrankings.com/forum/in...st=0&p=251628&

AJAX method with the server side code in ASP ( post #6 )

You can use exactly the same principle with PHP instead
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 07-25-2008 at 05:09 PM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to php or javascript?
 

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.29429 seconds with 12 queries