opening webpages in new tab/window

Hi All.

I have a very basic autosurf script that i am changing for a charity event that i am putting on, the reason for me using autosurf script is because it basically has what i need except my problem comes to it opens pages in a frame and i need it to open in a new window/tab. I know that everyone that visits will have to enable pop ups for the site but thats no problem.

Can you please help me remove the frame so that every site opens in new tab/window and then closes again after 30 seconds and then new window/tab opens for 30 seconds ect…

The must of this has to be that when the website opens it opens with there domain (http://www.their-domain.com) and not as it is (http://www.my-domain.com/hits.php

When i click on surf at the moment it shows (http://my-domain.com/hits.php and on this file there is written:

[php]<?
unset($id_site_ses);
session_start();
session_register(“id_site_ses”);

require(‘config_inc.php’);
require(‘error_inc.php’);

//require(‘error_inc.php’);
//require(‘config_inc.php’);

$id=intval($id);

$query = “select * from “.$t_user.” where id=”.$id;
$result = MYSQL_QUERY($query);
$type=@mysql_result($result,0,“type”);
$br=@mysql_result($result,0,“br”);

if($type==0){
if($br==0){
$cr=$basic_min;
}elseif($br==1){
$cr=$basic_max;
}
}elseif($type==1){
if($br==0){
$cr=$silver_min;
}elseif($br==1){
$cr=$silver_max;
}
}elseif($type==2){
if($br==0){
$cr=$gold_min;
}elseif($br==1){
$cr=$gold_max;
}
}
//print $cr;
?>

<?=$site1;?> [/php]

and on that file i see a call for autohits.php that on this file it says:

[php]<?
unset($id_site_ses);
session_start();
session_register(“id_site_ses”);

$id=intval($id);
$id1=intval($id1);
$id2=intval($id2);

require(‘config_inc.php’);
require(‘error_inc.php’);

//require(‘error_inc.php’);
//require(‘config_inc.php’);
require(‘apanel/vars.conf.php’);

$query = "select br,type,own,idc from ".$t_user.",".$t_idu_idc." where id=".$id." and id=idu ";
$result = MYSQL_QUERY($query);
while($row = mysql_fetch_array($result)){
	$cat[]=$row["idc"];
}

$type=@mysql_result($result,0,"type");
$br=@mysql_result($result,0,"br");
$own=@mysql_result($result,0,"own");
@mysql_free_result($result); 

if($type==0){
	if($br==0){
		$cr=$basic_min;
	}elseif($br==1){
		$cr=$basic_max;
	}
}elseif($type==1){
	if($br==0){
		$cr=$silver_min;
	}elseif($br==1){
		$cr=$silver_max;
	}
}elseif($type==2){
	if($br==0){
		$cr=$gold_min;
	}elseif($br==1){
		$cr=$gold_max;
	}
}

$query = "select id from ".$t_site." where idu=".$id." order by id";      
$result = MYSQL_QUERY($query);

$klv=mysql_num_rows($result);
if($id2>=$klv-1){
	$id3=@mysql_result($result,0,"id");
	$id2=0;
}else{
	$id3=mysql_result($result,$id2+1,"id");
	$id2++;
}


if(time()>$id_site_ses[exp]-1){

$query = "update ".$t_site." set credits=credits+".$cr." where id=".$id3;      
$result = MYSQL_QUERY($query);

}else{
?>
<script language='javascript'>
parent.mainFrame.location.href="<?=$url_default;?>";
</script>
<?
exit;
}



$query = "update ".$t_user." set c".date("w")."=c".date("w")."+".$cr.", cr_earn=cr_earn+".$cr." where id=".$id;      
$result = MYSQL_QUERY($query);


if(time()>$id_site_ses[exp]-1){


for($i=1;($i<=5)and($own!=0);$i++){
	$query = "update ".$t_user." set credits=credits+".($ref_cr[$i]*$cr).",  c".date("w")."=c".date("w")."+".($ref_cr[$i]*$cr)." where id=".$own;      
	$result = MYSQL_QUERY($query);
	$query = "select own from ".$t_user." where id=".$own;
	$result = MYSQL_QUERY($query);
	$own=mysql_result($result,0,0);
	@mysql_free_result($result);
	}

}else{
?>
<script language='javascript'>
parent.mainFrame.location.href="<?=$url_default;?>";
</script>
<?
//print 'Timer error 2';
exit();
}


mt_srand((double)microtime()*1000000);
$query = "select distinct(id),url from ".$t_site.",".$t_idm_idc." where idu!=".$id." and id!=".$id1." and b=2 and credits>0 and idm=id and ( ";
$klv=sizeof($cat);
$query.=" idc=".$cat[0];
for($i=1;$i<$klv;$i++){
	$query.=" or idc=".$cat[$i];
}     
$query=$query." ) ";
for($i=1;$i<count($id_site_ses["id"]);$i++){
	if($id_site_ses["time"][$i]>mktime()-$time_autohit){
		$query=$query." and id!=".$id_site_ses["id"][$i]." ";
	}
}
$query=$query."  order by id";
$result = MYSQL_QUERY($query);

$fl=false;
if(@mysql_num_rows($result)==1){
	$k=0;
}elseif(@mysql_num_rows($result)==0){
	$fl=true;
}else{
	$k=mt_rand(0,mysql_num_rows($result)-1);
}


if($fl==false){
	$idf=mysql_result($result,$k,"id");
	$query1 = "update ".$t_site." set credits=credits-1, pokaz=pokaz+1, p".date("w")."=p".date("w")."+1 where id=$idf";
	$n=count($id_site_ses["id"]);
	$id_site_ses["id"][$n+1]=mysql_result($result,$k,"id");
	$id_site_ses["time"][$n+1]=mktime();
	$result1=MYSQL_QUERY($query1);
	$url1=mysql_result($result,$k,"url");
	$id1=mysql_result($result,$k,"id");
}else{
	$url1=$url_default;
}

$id_site_ses[exp]=(time()+$delay);

//print_r($id_site_ses);
//print sizeof($id_site_ses[id]);
//exit;

?>

[/php]

I know it is out dated and there are more advanced ones but i dont need anything fancy and this one is perfect except for the frames.

Please help me

Best regads

Richard

Sponsor our Newsletter | Privacy Policy | Terms of Service