gratis scripts

Gestart doorRogier9 reacties32 weergaven

10 berichten · pagina 1 van 1

Rogier

Lid · Topicstarter

Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hey,

ik ben PHP aan het leren en ben dus aan het oefenen met scriptjes maken.

hier plaats ik al mijn nieuwe scripts (headpost) en ik wil graag dat andere mensne hier geen scripts neerzetten en eventuele verbeteringen via PB sturen.

de © moet blijven staan!

allereerst: random banner script / voorbeeld: www.rogier.one2xs.com/test/banner.php
met dit script kan je simpel banner en url toevoegen naar een plek.

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #FF8000]//maak de array met banners[/COLOR]
[COLOR= #0000BB]$banner[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://rogier.one2xs.com/test/banner1.png[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://rogier.one2xs.com/test/banner2.png[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://rogier.one2xs.com/test/banner3.png[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]//maak de array met urls[/COLOR]
[COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://www.one2xs.com[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.wolm.nl[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.gsmbundels.nl[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]//vul de variable $i met een random getal van nul tot maximaal het aantal elementen van de banner array[/COLOR]
[COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$banner[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]//geeft een link met daarin de banner weer als HTML op de pagina.[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ><img src="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$banner[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" /></a>[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]//© Rogier fischer 2009 - 2011[/COLOR]

?>


hier een loterij script met hulp van anubisfan. voorbeeld: www.rogier.one2xs.com/test/loterij.php

[COLOR= #0000BB]<?php
$deelnemer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]rogier[COLOR= #007700],[/COLOR] daan[COLOR= #007700],[/COLOR] thijs[COLOR= #007700],[/COLOR] tijmen[COLOR= #007700],[/COLOR] milan[COLOR= #007700],[/COLOR] ruben[COLOR= #007700],[/COLOR] rik[COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// deelnemers in een array[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]de winaar is: <strong>[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$deelnemer[/COLOR][COLOR= #007700][[/COLOR][URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$deelnemer[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]))] .[/COLOR] [COLOR= #DD0000]</strong>[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// haalt random 1 deelnemer op [/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]de deelnemers waren:[/COLOR][COLOR= #007700];[/COLOR]



[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$deelnemer[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++)
{[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$deelnemer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]];
    
}[/COLOR]
[COLOR= #FF8000]// maakt een lijst met deelnemers [/COLOR]
?>


er volgen meer!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
oke leuk kan iedereen wel gebruiken
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ahh bedankt! Dat script zocht ik net!
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Eh... Hij doet het niet goed.

Gsmbundels = wolm
Games dinges = gsmbundels
bux = one2xs
wolm komt helemaal niet
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Ik blijf toch liever bij mijn mysql based dingetje biggrin
0
Rogier

Lid · Topicstarter

Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
loterij script toegevoegd!
0
Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@rogier, bet doe je het via database de loterij script? Nog iets kan geen kwaat, dat mensen lot kunne kopenyummie
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
waarvoor is dit?
$start = $deelnemer[0];
$einde = $deelnemer[6];
0
Rogier

Lid · Topicstarter

Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik probeerde het eerst met while, dus dat stata voor niks (meer)
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren