kliklinks webmaster code.

Freestyle

New member
Ik wil bij mijn linkpartners deze code:

<script language="javascript" type="text/javascript" src="http://www.one2xs.com/klik_js?user=freestyle"></script>

Mijn idee is dat er een API van komt.

Je kan die api dus aanpassen zodat je bijvoorbeeld maximaal 1link laat zien.
Of 1 random link kan laten tonen.

En als er niks is dat er dan ook niks word weergeven.
 

Sjoerd

Active member
Codeblok:



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

[COLOR= #0000BB]<?php
$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]JOUWNAAMHIER[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] file_get_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.one2xs.com/klik_js?user=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]);[/COLOR]
if[COLOR= #007700]([/COLOR]strstr[COLOR= #007700]([/COLOR][COLOR= #0000BB]$contents[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]one2xs::user_unknown[/COLOR][COLOR= #007700]) !==[/COLOR] FALSE[COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]sjoerd[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] file_get_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.one2xs.com/klik_js?user=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]);
}[/COLOR]

[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] str_replace[COLOR= #007700]([/COLOR][COLOR= #DD0000]"&euro;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"€"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] str_replace[COLOR= #007700]([/COLOR][COLOR= #DD0000]"&aacute;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"a"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] explode[COLOR= #007700]([/COLOR][COLOR= #DD0000]"document.write("[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] explode[COLOR= #007700]([/COLOR][COLOR= #DD0000]");"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
preg_match_all[COLOR= #007700]([/COLOR][COLOR= #DD0000]/<a href="(.*)" target="_blank">(.*)</a>/iU[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$links[/COLOR] [COLOR= #007700]=[/COLOR] array[COLOR= #007700]();[/COLOR]
for[COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] sizeof[COLOR= #007700]([/COLOR][COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++){[/COLOR]
[COLOR= #0000BB]$links[/COLOR][COLOR= #007700][] =[/COLOR] array[COLOR= #007700]([/COLOR][COLOR= #DD0000]url[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]titel[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]);
}[/COLOR]
if[COLOR= #007700]([/COLOR]count[COLOR= #007700]([/COLOR][COLOR= #0000BB]$links[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$links[/COLOR][COLOR= #007700][[/COLOR]rand[COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] count[COLOR= #007700]([/COLOR][COLOR= #0000BB]$links[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])];
}[/COLOR]
else
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] array[COLOR= #007700]([/COLOR][COLOR= #DD0000]url[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]http://www.relisten.nl/[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]titel[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]Relisten ~ Nummer gemist?[/COLOR][COLOR= #007700]);
}[/COLOR]
echo [COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" target="_blank">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</a>[/COLOR][COLOR= #007700];[/COLOR]
?>






probeer zoiets eens

alleen dan wordt er wel steeds een request naar one2xs gedaan. Maar dat zou met een API ook zo zijn, en is met die klik_js ook zo..
 

Alemaalte

New member
Joerie er misschien even bijzeggen dat hij jou gebruikersnaam neemt als hij de andere niet vindt en dat als er geen links zijn hij relisten erinzet? Daar kan niemand iets op tegen hebben maar het is altijd leuk het er even bij te zetten.
yummie.gif
 

Sjoerd

Active member
Freestyle (link):
Bedankt!!!

Alleen ik heb een vraagje. Hij wisselt automatisch van andere klik advertentie???
Ja, zou je even dat script opnieuw willen pakken, en de naam willen veranderen. Ik heb nu al 0.03 punten ontvangen door voor jou hoorden te zijn. Ik heb ze naar je gestuurd
wink.gif


edit: nevermind, dat zijn kliks die ik een half jaar geleden deed op die klik-ads
emo.gif


Maar heb je wel je eigen naam er in gezet?



Alemaalte (link):
Joerie er misschien even bijzeggen dat hij jou gebruikersnaam neemt als hij de andere niet vindt en dat als er geen links zijn hij relisten erinzet? Daar kan niemand iets op tegen hebben maar het is altijd leuk het er even bij te zetten.
yummie.gif

die 4e en 5e regels worden alleen uitgevoerd als daarvoor bij $user een verkeerde naam gebruikt werd.

edit3: De code nog eens getest met meerdere advertenties en werkt goed
smile.gif
 

Freestyle

New member
Sjoerd (link):

Freestyle (link):
Bedankt!!!

Alleen ik heb een vraagje. Hij wisselt automatisch van andere klik advertentie???
Ja, zou je even dat script opnieuw willen pakken, en de naam willen veranderen. Ik heb nu al 0.03 punten ontvangen door voor jou hoorden te zijn. Ik heb ze naar je gestuurd
wink.gif


edit: nevermind, dat zijn kliks die ik een half jaar geleden deed op die klik-ads
emo.gif


Maar heb je wel je eigen naam er in gezet?



Alemaalte (link):
Joerie er misschien even bijzeggen dat hij jou gebruikersnaam neemt als hij de andere niet vindt en dat als er geen links zijn hij relisten erinzet? Daar kan niemand iets op tegen hebben maar het is altijd leuk het er even bij te zetten.
yummie.gif

die 4e en 5e regels worden alleen uitgevoerd als daarvoor bij $user een verkeerde naam gebruikt werd.

edit3: De code nog eens getest met meerdere advertenties en werkt goed
smile.gif




Ik heb de naam verandert
confused.gif



Codeblok:



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

[COLOR= #0000BB]<?php $user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]freestyle[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] file_get_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.one2xs.com/klik_js?user=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]);[/COLOR]
if[COLOR= #007700]([/COLOR]strstr[COLOR= #007700]([/COLOR][COLOR= #0000BB]$contents[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]one2xs::user_unknown[/COLOR][COLOR= #007700]) !==[/COLOR] FALSE[COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]freestyle[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] file_get_contents[COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.one2xs.com/klik_js?user=sjoed[/COLOR][COLOR= #007700]);
}[/COLOR]

[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] str_replace[COLOR= #007700]([/COLOR][COLOR= #DD0000]"&euro;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"€"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] str_replace[COLOR= #007700]([/COLOR][COLOR= #DD0000]"&aacute;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"a"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] explode[COLOR= #007700]([/COLOR][COLOR= #DD0000]"document.write("[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] explode[COLOR= #007700]([/COLOR][COLOR= #DD0000]");"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
preg_match_all[COLOR= #007700]([/COLOR][COLOR= #DD0000]/<a href="(.*)" target="_blank">(.*)</a>/iU[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$links[/COLOR] [COLOR= #007700]=[/COLOR] array[COLOR= #007700]();[/COLOR]
for[COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] sizeof[COLOR= #007700]([/COLOR][COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++){[/COLOR]
[COLOR= #0000BB]$links[/COLOR][COLOR= #007700][] =[/COLOR] array[COLOR= #007700]([/COLOR][COLOR= #DD0000]url[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]titel[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]);
}[/COLOR]
if[COLOR= #007700]([/COLOR]count[COLOR= #007700]([/COLOR][COLOR= #0000BB]$links[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$links[/COLOR][COLOR= #007700][[/COLOR]rand[COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] count[COLOR= #007700]([/COLOR][COLOR= #0000BB]$links[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])];
}[/COLOR]
else
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] array[COLOR= #007700]([/COLOR][COLOR= #DD0000]url[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]http://www.vanmarijn.nl/[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]titel[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]VanMarijn[/COLOR][COLOR= #007700]);[/COLOR]
?>




 

Freestyle

New member
Ik was 1 ding vergeten


$contents = file_get_contents(http://www.one2xs.com/klik_js?user=sjoed);

En die 0,03 wil ik best terug hoor
santabaard.gif
 

Sjoerd

Active member
Freestyle (link):
Ik was 1 ding vergeten


$contents = file_get_contents(http://www.one2xs.com/klik_js?user=sjoed);

En die 0,03 wil ik best terug hoor
santabaard.gif

Zoals je in die edit kon lezen was dat van mij nog een half jaar geleden oid. Niets van jou dus
emo.gif

Jij had je naam ook al verandert, dus kon niet eens van jou zijn
sadley.gif
 
Bovenaan