Skocz do zawartości

Link-Vault a strona w html


Rekomendowane odpowiedzi

Witam,

mam problem nie potrafię "podpiąć" LinkVaulta pod swoje www (www.hipoteczny.kredyt.org.pl). Kiedyś używałem Linkora i tam miałem pliki które trzeba było wgrać zmienić chmod na 666 i jazda a tutaj .... hmm lamer zone - może ktoś się zlituje i pomoże [gg4862409] bądź poda mi jakiś link z dokładną polską instrukcją bo "gwałcę" googla od rana i nie moge sobie poradzić ...

Z góry dzięki za pomoc

PS może ktoś z tej instrukcji zrobiłby mi te pliki do wgrania na serwer:

Site Setup Instructions for www.hipoteczny.kredyt.org.pl

Please follow these step-by-step instructions to add the adverts to your pages. This forms the basis of your 'Vaultage' evaluation. Please note these set up instructions are site specific and these instructions should only be used on www.hipoteczny.kredyt.org.pl (there will be no affect on Vaultage if you use this on any other websites). If you would like to add another website to your account to increase your Vaultage please click on 'Account & Site Settings' above.

Specific examples: phpbb forum - vBulletin forum

1. Create a file called lvt4nIm88x1rNG99uc.php in the lv folder of your website (i.e. https://www.hipoteczny.kredyt.org.pl/lvt4nI...8x1rNG99uc.php)

1.b Copy and paste the code below in to the lvt4nIm88x1rNG99uc.php file you have just created, and upload it in to your root folder.

<?php

// © 2005 All rights reserved link-vault.com

$lv_ScriptVersion = '1.3.06';

if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;

if (!function_exists('get_file')) {

function get_file($url) {

$strng = '';

if ($h = @fopen($url, 'r')) {

while(!feof($h) and (connection_status()==0)) {

$strng = $strng . fread($h, 524288);

}

fclose($h);

} else {

$strng = 'COMMS FAILURE';

}

return $strng;

}

}

if (!function_exists('getvarfile')) {

function getvarfile() {

$lv_varfile = 't4nIm88x1rNG99uc.txt';

for ($i = 0; $i <= 11; $i++) {

$path = substr ('../../../../../../../../../../', 0, $i * 3);

if (file_exists ($path . $lv_varfile)) {

$lv_varfile = $path . $lv_varfile;

break;

}

}

if ('' != '') {

if (!file_exists ($lv_varfile)) {

$lv_varfile = 't4nIm88x1rNG99uc.txt';

for ($i = 0; $i <= 11; $i++) {

$path = substr ('../../../../../../../../../../', 0, $i * 3);

if (file_exists ($path . $lv_varfile)) {

$lv_varfile = $path . $lv_varfile;

break;

}

}

}

}

return $lv_varfile;

}

}

if (!function_exists('lv_register_shutdown')) {

function lv_register_shutdown() {

$url = "https://www.link-vault.com/comms.asp?sc=t4nIm88x1rNG99uc&action=talktome";

if ($h = @fopen($url, 'r')) {

if (function_exists('stream_set_timeout')) {stream_set_timeout($h, 2);}

fread($h,1);

fclose($h);

}

}

}

if (!function_exists('SaveVars')) {

function SaveVars() {

global $lv_URLs;

global $lv_URLCount;

global $lv_NewURLs;

global $lv_NewURLCount;

global $lv_Links;

global $lv_LinkOnURLs;

global $lv_RequestMade;

global $lv_LastCommunication;

global $lv_TestMode;

global $lv_MaxPages;

$file = fopen(getvarfile(), 'r+');

if (flock ($file, LOCK_EX)) {

fwrite ($file, $lv_URLs . '<varseperator>' . $lv_URLCount . '<varseperator>' . $lv_NewURLs . '<varseperator>' . $lv_NewURLCount . '<varseperator>' . $lv_Links . '<varseperator>' . $lv_LinkOnURLs . '<varseperator>' . $lv_RequestMade . '<varseperator>' . $lv_LastCommunication . '<varseperator>' . $lv_TestMode . '<varseperator>' . $lv_MaxPages);

ftruncate ($file, ftell($file));

flock ($file, LOCK_UN);

}

fclose ($file);

return;

}

}

if (!function_exists('LoadVars')) {

function LoadVars() {

global $lv_URLs;

global $lv_URLCount;

global $lv_NewURLs;

global $lv_NewURLCount;

global $lv_Links;

global $lv_LinkOnURLs;

global $lv_RequestMade;

global $lv_LastCommunication;

global $lv_TestMode;

global $lv_MaxPages;

$vars = get_file(getvarfile());

if ($vars == 'COMMS FAILURE') {

echo 'cannot read from link vault text file';

} else {

$vars_temp = explode ('<varseperator>', $vars);

if (count($vars_temp) > 0) {$lv_URLs = $vars_temp[0];} else {

$lv_URLs = '';

}

if (count($vars_temp) > 1) {$lv_URLCount = $vars_temp[1];} else {

$lv_URLCount = 0;

}

if (count($vars_temp) > 2) {$lv_NewURLs = $vars_temp[2];} else {

$lv_NewURLs = '';

}

if (count($vars_temp) > 3) {$lv_NewURLCount = $vars_temp[3];} else {

$lv_NewURLCount = 0;

}

if (count($vars_temp) > 4) {$lv_Links = $vars_temp[4];} else {

$lv_Links = '';

}

if (count($vars_temp) > 5) {$lv_LinkOnURLs = $vars_temp[5];} else {

$lv_LinkOnURLs = '';

}

if (count($vars_temp) > 6) {$lv_RequestMade = $vars_temp[6];} else {

$lv_RequestMade = 0;

}

if (count($vars_temp) > 7) {$lv_LastCommunication = $vars_temp[7];} else {

$lv_LastCommunication = Time()-86400;

}

if (count($vars_temp) > 8) {$lv_TestMode = $vars_temp[8];} else {

$lv_TestMode = 1;

}

if (count($vars_temp) > 9) {$lv_MaxPages = $vars_temp[9];} else {

$lv_MaxPages = 20000;

}

}

return;

}

}

$lv_TextLinksURL = 'https://www.link-vault.com/comms.asp?sc=t4nIm88x1rNG99uc';

if (substr($_SERVER['SCRIPT_NAME'],strlen($_SERVER['SCRIPT_NAME'])-22) == 'lvt4nIm88x1rNG99uc.php') {

switch ($_REQUEST['action']) {

case "resetsite":

LoadVars();

$lv_URLs = get_file($lv_TextLinksURL . "&action=givemeallurls");

if ($lv_URLs == 'COMMS FAILURE') {

echo 'comms failure performing task givemeallurls';

} else {

$lv_URLCount = (strlen($lv_URLs) - strlen(str_replace("<URL>","",$lv_URLs)))/5;

$lv_Links = get_file($lv_TextLinksURL . "&action=givemealllinks");

if ($lv_Links == 'COMMS FAILURE') {

echo 'comms failure performing task givemealllinks';

} else {

$lv_LinkOnURLs = get_file($lv_TextLinksURL . "&action=givemeallplacements");

if ($lv_LinkOnURLs == 'COMMS FAILURE') {

echo 'comms failure performing task givemeallplacements';

} else {

$lv_LastCommunication = Time()-86400;

if ($_REQUEST['testmode'] == "on") {

$lv_TestMode = 1;

} else {

$lv_TestMode = 0;

}

$lv_MaxPages = $_REQUEST['maxpages'];

SaveVars();

echo 'success';

}

}

}

break;

case "getnewlinks":

LoadVars();

$lv_Links = get_file($lv_TextLinksURL . "&action=givemealllinks");

if ($lv_Links == 'COMMS FAILURE') {

echo 'comms failure performing task givemealllinks';

} else {

$lv_LinkOnURLs = get_file($lv_TextLinksURL . "&action=givemeallplacements");

if ($lv_LinkOnURLs == 'COMMS FAILURE') {

echo 'comms failure performing task givemeallplacements';

} else {

SaveVars();

echo 'success';

}

}

break;

case "newurl":

LoadVars();

if (!(strpos($lv_NewURLs,"<URL>" . $_REQUEST['newurl'] . "</URL>" . $_REQUEST['slots']) === false)) {

$p = strpos($lv_NewURLs,"<URL>" . $_REQUEST['newurl'] . "</URL>");

$q = strpos($lv_NewURLs,"<URL>",$p + 1);

if ($p > 0) {

if ($p == 1) {

if ($q > 0) {

$lv_NewURLs = substr($lv_NewURLs,$q);

} else {

$lv_NewURLs = '';

}

} else {

if ($q > 0) {

$lv_NewURLs = substr($lv_NewURLs,0,$p-1) . substr($lv_NewURLs,$q);

} else {

$lv_NewURLs = substr($lv_NewURLs,0,$p-1);

}

}

}

}

if (strpos($lv_URLs,"<URL>" . $_REQUEST['newurl'] . "</URL>" . $_REQUEST['slots'] . ":" . $_REQUEST['urlid']) === false) {

$p = strpos($lv_URLs,"<URL>" . $_REQUEST['newurl'] . "</URL>");

$q = strpos($lv_URLs,"<URL>",$p + 1);

if ($p > 0) {

if ($p == 1) {

if ($q > 0) {

$lv_URLs = substr($lv_URLs,$q);

} else {

$lv_URLs = '';

}

} else {

if ($q > 0) {

$lv_URLs = substr($lv_URLs,0,$p-1) . substr($lv_URLs,$q);

} else {

$lv_URLs = substr($lv_URLs,0,$p-1);

}

}

}

$lv_URLs = $lv_URLs . "<URL>" . $_REQUEST['newurl'] . "</URL>" . $_REQUEST['slots'] . ":" . $_REQUEST['urlid'];

SaveVars();

}

break;

case "getnewurls":

LoadVars();

if (!$lv_NewURLs == "") {

echo '<NEWURLS>' . $lv_NewURLs . '</NEWURLS>';

$lv_NewURLCount = 0;

$lv_NewURLs = "";

}

if ($_REQUEST['testmode'] == "on") {

$lv_TestMode = 1;

} else {

$lv_TestMode = 0;

}

SaveVars();

break;

case "settestmode":

LoadVars();

if ($_REQUEST['testmode'] == "on") {

$lv_TestMode = 1;

} else {

$lv_TestMode = 0;

}

SaveVars();

echo 'success';

break;

case "getscriptversion":

echo $lv_ScriptVersion;

break;

case "commscheck":

echo get_file($lv_TextLinksURL . "&action=commscheck");

break;

}

exit;

}

if (!function_exists('DisplayLinks')) {

function DisplayLinks($NumberOfSlots,$Header,$Delimiter,$Footer,$ClassName) {

if (!isset($_GET)) $_GET = $HTTP_GET_VARS;

foreach ($_GET AS $item) {

if (strlen($item) == 32) {

return;

}

}

global $lv_URLs;

global $lv_URLCount;

global $lv_NewURLs;

global $lv_NewURLCount;

global $lv_Links;

global $lv_LinkOnURLs;

global $lv_RequestMade;

global $lv_LastCommunication;

global $lv_TestMode;

global $lv_MaxPages;

$lv_TextLinksURL = 'https://www.link-vault.com/comms.asp?sc=t4nIm88x1rNG99uc';

if ($NumberOfSlots > 5) {$NumberOfSlots = 5;}

if ($NumberOfSlots < 1) {$NumberOfSlots = 1;}

$ThisURL = $_SERVER['REQUEST_URI'];

if ($ThisURL == "") {

$ThisURL = $_SERVER['PATH_INFO'];

if ($ThisURL != "") {

if ($_SERVER['QUERY_STRING'] != "") {

$ThisURL = $_SERVER['PATH_INFO'] . "?" . $_SERVER['QUERY_STRING'];

}

}

}

if ($ThisURL == "") {

$ThisURL = $_SERVER['SCRIPT_NAME'];

if ($ThisURL != "") {

if ($_SERVER['QUERY_STRING'] != "") {

$ThisURL = $_SERVER['SCRIPT_NAME'] . "?" . $_SERVER['QUERY_STRING'];

}

}

}

LoadVars();

$OutputThis = '';

$LinksDisplayed = 0;

if ($lv_URLs == "" && $lv_NewURLs == "") {

$lv_NewURLs = "<URL>" . $ThisURL . "</URL>" . $NumberOfSlots;

$lv_NewURLCount = 1;

} else {

if (strpos($lv_URLs,"<URL>" . $ThisURL . "</URL>") === false) {

if ($lv_MaxPages > $lv_URLCount && (strpos($lv_NewURLs,"<URL>" . $ThisURL . "</URL>") === false)) {

$lv_NewURLs = $lv_NewURLs . "<URL>" . $ThisURL . "</URL>" . $NumberOfSlots;

$lv_NewURLCount = $lv_NewURLCount + 1;

$lv_URLCount = $lv_URLCount + 1;

}

} else {

if (strpos($lv_URLs,"<URL>" . $ThisURL . "</URL>" . $NumberOfSlots) === false) {

$lv_NewURLs = $lv_NewURLs . "<URL>" . $ThisURL . "</URL>" . $NumberOfSlots;

$lv_NewURLCount = $lv_NewURLCount + 1;

$lv_URLCount = $lv_URLCount + 1;

}

$IDStart = strpos($lv_URLs,"<URL>" . $ThisURL . "</URL>") + strlen("<URL>" . $ThisURL . "</URL>");

$IDStart = strpos($lv_URLs,":",$IDStart) + 1;

if (strpos($lv_URLs,"<",$IDStart) !== false) {

$URLID = substr($lv_URLs,$IDStart,strpos($lv_URLs,"<",$IDStart)-$IDStart);

} else {

$URLID = substr($lv_URLs,$IDStart);

}

if (strpos($lv_LinkOnURLs,"U" . $URLID . ";") !== false) {

$LinksStart = strpos($lv_LinkOnURLs,"U" . $URLID . ";") + strlen($URLID) + 2;

$DLinks = substr($lv_LinkOnURLs,$LinksStart,strpos($lv_LinkOnURLs,":",$LinksStart)-$LinksStart);

$DLsp = explode(",",$DLinks);

for ($i=0; $i<count($DLsp); $i++) {

if (strpos($lv_Links,"<LINK" . $DLsp[$i] . ">") !== false) {

$LinksStart = strpos($lv_Links,"<LINK" . $DLsp[$i] . ">") + strlen($DLsp[$i]) + 6;

if ($LinksDisplayed > 0) {

$OutputThis = $OutputThis . $Delimiter;

} else {

$OutputThis = $OutputThis . $Header;

}

$TheLink = substr($lv_Links,$LinksStart,strpos($lv_Links,"</LINK>",$LinksStart)-$LinksStart);

if ($ClassName != "") {

$TheLink = str_replace('">','" class="' . $ClassName . '">',$TheLink);

}

$OutputThis = $OutputThis . $TheLink;

$LinksDisplayed = $LinksDisplayed + 1;

}

}

}

}

}

if ($lv_TestMode == 1) {

$OutputThis = 'Page: ' . $ThisURL . ' : ' . $OutputThis;

if ($LinksDisplayed == 0) {

$OutputThis = $OutputThis . $Header;

}

for ($i = $LinksDisplayed + 1; $i <= $NumberOfSlots; $i++) {

if ($i > 1) {

$OutputThis = $OutputThis . $Delimiter;

}

$OutputThis = $OutputThis . '<a href="#"';

if (!$ClassName == "") {

$OutputThis = $OutputThis . ' class="' . $ClassName . '"';

}

$OutputThis = $OutputThis . '>TestLink' . $i . '</a>';

}

$LinksDisplayed = $NumberOfSlots;

}

if ($LinksDisplayed > 0) {

$OutputThis = $OutputThis . $Footer;

}

$lv_NewURLCount = (strlen($lv_NewURLs) - strlen(str_replace("<URL>","",$lv_NewURLs)))/5;

if ($lv_NewURLCount > 9 || ($lv_NewURLCount > 0 && (Time() - $lv_LastCommunication) > 900)) {

if (Time() - $lv_LastCommunication > 60) {

$lv_LastCommunication = Time();

SaveVars();

register_shutdown_function('lv_register_shutdown');

} else {

SaveVars();

}

} else {

SaveVars();

}

Return $OutputThis;

}

}

?>

1.c Create another (empty) file called t4nIm88x1rNG99uc.txt in the lv folder of your website (https://www.hipoteczny.kredyt.org.pl/t4nIm88x1rNG99uc.txt) and give it read/write access (use your ftp client to change properties of file once uploaded).

2. The following piece of code includes the links on to your pages, therefore it must be copied on to every page or ideally in to your footer file. The number after the open bracket sets the number of links displayed (can be any number from 1 to 5).

<?php

ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../:../../../../../');

include ('lvt4nIm88x1rNG99uc.php');

echo DisplayLinks(5,'',' - ','','');

?>

Tip: You can edit the start and finish of the links by editing the header and footer between the quotes. Likewise you can edit the separator ' - ' to fit in with your design, and set a css class for the links.

Html: Do not despair if you site is coded in html, you will still be able to get these links to work, but you will need to configure you server to process html as it would php pages. To do this create a file named .htaccess in the root directory for your site and in it put the following:

AddType application/x-httpd-php .php .htm .html

Auto Update: (recommended) This code automatically gets the latest version of lvt4nIm88x1rNG99uc.php when available, you will receive email notification of all code updates. Copy and paste the following code into a file called aut4nIm88x1rNG99uc.php in your lv folder (i.e. https://www.hipoteczny.kredyt.org.pl/aut4nI...8x1rNG99uc.php). For this code to work you will need to set the write permissions of lvt4nIm88x1rNG99uc.php to read/write.

<?php

// © 2005 All rights reserved link-vault.com

// autoupdate.php

if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;

if (!function_exists('get_file')) {

function get_file($url) {

$h = fopen($url, 'r');

$strng = '';

while(!feof($h) and (connection_status()==0)) {

$strng = $strng . fread($h, 524288);

}

fclose($h);

return $strng;

}

}

if (!function_exists('SaveLinkVault')) {

function SaveLinkVault($newlinkvault) {

$file = fopen('lvt4nIm88x1rNG99uc.php', 'r+');

if (flock ($file, LOCK_EX)) {

fwrite ($file, $newlinkvault);

ftruncate ($file, ftell($file));

flock ($file, LOCK_UN);

}

fclose ($file);

return;

}

}

$TextLinksURL = 'https://www.link-vault.com/comms.asp?sc=t4nIm88x1rNG99uc';

SaveLinkVault(get_file($TextLinksURL . "&action=getnewlinkvault"));

echo 'success';

?>

Test Mode: To test you have set your site up correctly go to your account page and check that test mode is on for this site (by default new sites start off in test mode). If it is working correctly you should see Test Link 1, Test Link 2, etc.

Once the test links are showing correctly on your pages you can go back to your account page and turn test mode off, and providing your site is approved you will start to gain Vaultage. Please note, new adverts are assigned to your site over time so do not expect to see your site filled with links straight away! But be assured that if the test links are showing up in test mode then your site is set up correctly. To confirm this you will notice a vaultage increase. For more information and help setting up your site please visit our forum...

Last but not least click this link to check setup and activate

Odnośnik do komentarza
Udostępnij na innych stronach

Cytat z forum Link-vault...

Your host may not support php, check with them if they do. If not then you may need to change host to use link-vault.

Gość wie co gada - jest jednym z autorów link vaulta. Ja co prawda znam pewien sposób ale firmie hostingowej może się nie spodobać... Jeśli serwer z Twoją stroną obsługuje .htaccess to przy jego pomocy może Ci się udać zmusić serwer do parsowania plików html tak jak php. Do pliku wrzuć

AddType application/x-httpd-php .html 

To może wcale nie zadziałać! I na 1000% będzie generować ogromne ilości śmiecia w error_logu serwera WWW.

Odnośnik do komentarza
Udostępnij na innych stronach

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę. Warunki użytkowania Polityka prywatności