PDA

View Full Version : desperate need of a bit of script help


noooze
2004-06-18, 06:48 PM
Hiya peeps :)

I have a problem and i'm going crazy |help|
I need to be able to do one single popunder on my site and i need my info to go with, so the script on my trades server can see its from me.

Have just made a great deal and it works on one page ( they are on same server ) but on the other site it doesnt. have tryed every thing and even copy paste

the script looks like this :

<script>// JAVASCRIPT CODE
function goTrade(url) {
var winl = (screen.width - 790);
var wint = (screen.height - 500);
window.open('forceref.php?url='+url,'','height=500,width=790,top='+wint+',left='+winl+',scrollbars=0,toolbar=0,location=1,status=1,menubar=0,resizable=1,dependent=1,copyhistory=1');
}
goTrade('http://www.whatever.com/');
setTimeout("self.focus()",200);
</script>


and this :

<body text="#000000" link="#000000" onunload="goTrade('http://www.whatever.com/')">

and the php goes like this :

<?php
if (ini_get('register_globals') != 1) {
$supers = array('_REQUEST','_ENV','_SERVER','_COOKIE','_GET','_POST');
foreach ($supers as $__s) {
if (is_array($$__s) == true) extract($$__s, EXTR_OVERWRITE);
}
unset($supers);
}
if (!$name) {$name="Free Nude Videos and Images!!!";}
if (!$url) {print "NO URL SPECIFIED";exit;}
print'<html><head><title>'.$name.'</title></head><frameset cols="25%"><frame src="'.$url.'" FRAMEBORDER="0"></frameset></html>';
?>




and one more problem, gives a popunder at entry and exit. was supposed to only do that once.

can anyone help or give me a better way of doing this ?

I need some help as i'm a |newbie| when playing with scripts


regards
Noooze

Entreri
2004-06-20, 11:58 PM
Have just made a great deal and it works on one page ( they are on same server ) but on the other site it doesnt. have tryed every thing and even copy paste I'm not sure what you mean here. I assume that you tried to use the exact same script on another site. If that's the case, it does not work because of your window.open - you're trying to open script forceref.php in the page's context (eg. current directory). Use the entire URL instead.

and one more problem, gives a popunder at entry and exit. was supposed to only do that once. Remove the goTrade('http://www.whatever.com/'); within the <script> tags. You're calling your function twice... at unload and when the script loads.

can anyone help or give me a better way of doing this ? Yes, but I'm fairly sure there are plenty tutorials on this. ;) Also, be careful with that register_globals enabled in php...

Entreri.

noooze
2004-06-21, 02:56 PM
quite sure there are better ways of doing this but right now i havent got the patience of going though tons of reading materiel about this. Its summer, i have a dayjob, a baby and 4 kittens that are only 4 days old... I'm busy :)

Anyways...
sure you dont want to help ? ;)

I'm gonna sit down very soon and have a look this this programming as i need learn it