Jump to content
php.lv forumi

[scripts] Cik uzspiedushi


gangstadog

Recommended Posts

taka esmu noobs shajas lietas pagaidam...tadel veletos lai man palidz ar scriptu kur var dabut.. piemeram man ir kautkads banneris ielikts weba kods un es gribetu zinat cik uz vina uzspiedushi ir..varbut kads var iedot tadu scriptu kurs parada cik ir spiests uz ta bannera

 

Paldies

Link to comment
Share on other sites

Principaa tas daras saadi ..

pats banera links Ved uz atsevikju lapu kuraa ir aptuveni sekojosh kods..

<?php
$baneris=$_GET['id'];// ielasam banera id
$sql="SELEC links FROM baneri WHERE id=$baneris LIMIT 1"; // noskaidrojam linku kur patiesi vajag redirekteet
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$sql="UPDATE baneri SET skaits=skaits+1 WHERE id=$baneris LIMIT 1";// Updeitojam skaitu
$result=mysql_query($sql)
header("Location:".$row['links']); // redirektejam uz patieso banera linku
?>

//Atieciigi pats baneria links ir sekojosh <a href="mans_kods.php?id=9999" target="_blank">pats baneris</a>

kur tas 9999 ir banera ID iksh Datubazes...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...