forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Referer for websites (Program Refer)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Sat Apr 17, 2004 10:28 am    Post subject: Referer for websites (Program Refer) Reply with quote

VDS 4

Is there a way to let a website know "Your program Refered the user there" as in a link in the program sent them there?

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 17, 2004 10:34 am    Post subject: Reply with quote

You could send a HTTP variable with the link, by opening a link like this:

Quote:
http://www.myserver.com/mywebsite/index.php?referer=MyProgram

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 17, 2004 10:35 am    Post subject: Reply with quote

You can set the user-agent to something and then check the user-agent
on the server side. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 17, 2004 10:37 am    Post subject: Reply with quote

I don't think that will work, since I think kOt means a link which opens a browser window, in which you can't change the user-agent... Sad
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 17, 2004 10:40 am    Post subject: Reply with quote

oh
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Sat Apr 17, 2004 10:49 am    Post subject: Reply with quote

1st.. Thank you for a VERY VERY fast reply Smile

2nd..
Yes it opens a browser window. so
Code:
http://www.myserver.com/mywebsite/index.php?referer=MyProgram

Should work right?

Edit..
What if it isn't php? Would it still work?

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 17, 2004 10:55 am    Post subject: Reply with quote

Yes, that will work. The ?referrer=MyProgram will only appear in the site's
log file, unless the owner of the site uses PHP code to log the action.

For example:

Code:
<?php
// Call an include file to connect to the database
require("main.php");

// Obtain referrer
$referrer = $HTTP_GET_VARS['referrer'];

// Record referrer in database
$result = mysql_query("INSERT INTO `referrers` (`id`, `referrer`) VALUES ('', '$referrer');");

// Output the rest of the page
include("other_page.php");

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 17, 2004 4:11 pm    Post subject: Reply with quote

If you don't want to use PHP, you could also parse the stuff out by using Javascript to get the website location:

Code:
<script>
window.alert(location.href);
</script>


I don't know the exact Javascript functions you'll need, but they must be like "substring" and "strpos"... Smile

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group