Jump to content

Help - External Link


Ell20

Recommended Posts

Hi,

 

My friend has a website which gives bonuses to players who vote for the site on a voting site.

 

However at the monent all the user has to do is click the link to open the window in a new window and they recieve the bonus.

 

Is there anyway in which he can determine or not whether the actual vote button was pressed, if it was then give the bonus, otherwise dont give any bonuses until its actually been pressed?

 

Thanks for your help.

 

Elliot

Link to comment
https://forums.phpfreaks.com/topic/84569-help-external-link/
Share on other sites

Hey,

 

There are 6 voting sites but they all work in a very simular way.

 

This is the main one: http://www.mmorpgtoplist.com/in.php?site=7776

 

This is the link which is given to the users which takes them straight to voting for his site, however at the moment he has no way of determining whether or not the actual vote button is pressed.

 

Thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/84569-help-external-link/#findComment-430919
Share on other sites

try something like this on your friends website:

 

<a href="/curl.php">CLICK HERE TO VOTE FOR OUR WEBSITE</a>

 

curl.php

<?php

// MARK DOWN THAT THIS USER VOTED 4 UR SITE


// SUBMIT VOTE
function Post($vars,$url){
        $ch = curl_init();
        curl_setopt($ch,CURLOPT_URL,$url);
        curl_setopt($ch,CURLOPT_POST,1);
        #curl_setopt($ch,CURLOPT_UPLOAD,1);
        curl_setopt($ch,CURLOPT_POSTFIELDS,$vars);
        curl_exec($ch);
        curl_close($ch);
}

$submit = 'Vote for Street Crime - Modern Crime RPG';
$url = "http://www.mmorpgtoplist.com/in.php";
$vars = "site=7776&submit=$submit";

Post($vars,$url);
?>

 

im not sure if they'll count the vote,

it depends on the info on their in.php file

Link to comment
https://forums.phpfreaks.com/topic/84569-help-external-link/#findComment-430936
Share on other sites

Try a more simpler method. When clicking a vote button, set a cookie that would expire in say a few hours. That should give plenty of time for them to click the bonus button. Of course the bonus button, upon click, needs to check if the cookie is set. If the cookie is set, delete it and give the person the credit.

Link to comment
https://forums.phpfreaks.com/topic/84569-help-external-link/#findComment-431235
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.