Problem with outgoing links - php Form

Author Topic: Problem with outgoing links  (Read 1004 times)

Offline KoLSMS

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Problem with outgoing links
« on: August 24, 2010, 09:07:05 AM »


Hello,

first at all i want to say thank you for the great script, but now i have one problem, i hope you understand me, my english is not the best  ;D

when i visit a page over the script it goes but when i visit a page over the script twice or another link from the page it doesnt work... after a while i wait it goes again.. one visit is ok but the second visit is not going...

you can find my installation here: http://kolsms.webege.com/linkbase

thx for help!

Offline alex

  • Global Moderator
  • *****
  • Posts: 77
  • Karma: +19/-0
    • View Profile
Re: Problem with outgoing links
« Reply #1 on: August 25, 2010, 03:56:11 AM »
Quote
when i visit a page over the script it goes but when i visit a page over the script twice or another link from the page it doesnt work... after a while i wait it goes again.. one visit is ok but the second visit is not going...

out.php
 :) :)
Code: [Select]
<?php

require_once('admin/config.php');
$id $_GET['id'];
session_start();
if (!isset(
$_SESSION["jumps"]))
$_SESSION["jumps"] = 0;
$_SESSION["jumps"] = $_SESSION["jumps"] + 1;
if (
$_SESSION["jumps"] > 1)
{
//echo "text text";
}
else
{
$result mysql_query("SELECT linkid, text, linkurl, hits FROM oslink WHERE linkid='$id' ")
or die(
mysql_error());  
while(
$myrow mysql_fetch_assoc($result))
{
$resulty mysql_query("UPDATE oslink SET hits=hits+'1' WHERE linkid='$id'"
or die(
mysql_error());  
$redirect $myrow['linkurl'];
?>

<SCRIPT LANGUAGE="JavaScript">
redirTime = "50";
redirURL = "<?php echo $redirect ?>";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
//  End -->
</script>
<BODY onLoad="redirTimer()">
<?php
}
}
?>

Offline KoLSMS

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Problem with outgoing links
« Reply #2 on: August 25, 2010, 09:38:46 AM »
Hello,

i have changed the out.php code in that you have posted but i have the same problem?!

Dont know what is wrong  :o

Offline alex

  • Global Moderator
  • *****
  • Posts: 77
  • Karma: +19/-0
    • View Profile
Re: Problem with outgoing links
« Reply #3 on: August 25, 2010, 12:20:46 PM »
Code: [Select]
<?php
require_once('admin/config.php');
$id $_GET['id'];
$result mysql_query("SELECT linkid, text, linkurl, hits FROM oslink WHERE linkid='$id' ")
or die(
mysql_error());  
while(
$myrow mysql_fetch_assoc($result))
{
$resulty mysql_query("UPDATE oslink SET hits=hits+'1' WHERE linkid='$id'"
or die(
mysql_error());  
$redirect $myrow['linkurl'];
?>

<SCRIPT LANGUAGE="JavaScript">
redirTime = "50";
redirURL = "<?php echo $redirect ?>";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
//  End -->
</script>
<BODY onLoad="redirTimer()">
<?php
}
?>
:) :) :) :) :)

Offline KoLSMS

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Problem with outgoing links
« Reply #4 on: August 26, 2010, 06:31:46 AM »
ok, now it works, thank you very much!