/    Sign up×
Community /Pin to ProfileBookmark

php triggered screen shake

i know the script itself will most likly be java but im still pretty new to java and php and my programer jumped ship on me and i have to finish my site on my own..my site is all php with a bit of java.. i would like to give my admins and myself the option to type a users name into a box that only the admins see and shake that users screen…i know i should not be asking for this much help but im stuck and dont know where to go.. i tried studying php.net and a few java sites but i cant combine the 2 or know how to write them so they will work together.. if anyone can help me please post some ideas or aim me at GQMFSmooth

to post a comment
PHP

18 Comments(s)

Copy linkTweet thisAlerts:
@mityaJun 23.2004 — I don't know the code to shake the screen but what I can tell you is that it's zilch to do with PHP. All PHP could do is print out the java code to do it, e.g.

<?php

print ("java code here");

?>

PHP could also print it out conditionally, so you say you want the screen to shake when they've entered their name? If so...

<?php

if ($_POST['name']) { //i.e. this file is a form handler receiving var

//shake screen code

} else {

echo "you didn't enter a name.";

}
Copy linkTweet thisAlerts:
@bones420authorJun 23.2004 — sorry if this is a bit long but here it goes ... this is my main menu

i have added what i think is partly needed you will see where but i dont know how to realy do it or change the java to work with it

<?php

session_start();

include_once("check.login.func.php");

if (isset($_SESSION[id])){

mysql_query("update members set lastSeenDate = now() where id = $_
SESSION[id]");

};

switch($_GET[action])

{

case "loginFail":echo("<h2>Login Failure</h2>");break;

case "logout":

//unset($HTTP_SESSION_VARS['gtag']);

logout();

break;

case "login":

break;

}

?>

<html>

<head>

<link rel="stylesheet" href="html/style2.css" />

<script language="JavaScript" type="text/javascript">

<!--

function precheck(form)

{

if(form['gamertag'])

{

tag=form['gamertag'].value;

if(tag.length==0)

{

alert("Please specify a Gamertag");

return false;

form.action = 'html/signin.php';

}

}

if(form['password'])

{

tag=form['password'].value;

if(tag.length==0)

{

alert("Please specify a Password");

return false;

form.action = 'html/signin.php';

}

}



}

//-->

</script>

</head>

<body bgcolor="#000000" background="img/menu/backgrd.gif" OnLoad="window.defaultStatus='©2003- 2004 XBLGL.com All rights reserved. XBLGL.com is NOT affiliated with or partnered with Microsoft Xbox';">


<table width="100%" BACKGROUND="img/menu/backgrd.gif" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#5A5550" bgcolor="#000000">

<?php

// die("message:$message<br>");

if($_SESSION['id'] == 0)
{
?>


<form action="login.inc.php" method="post" onsubmit="return precheck(this)">

<tr bordercolor="5A5550" align="center">

<td><img src="img/menu/gamertag.gif"><br>

<input type="hidden" name="action" value="menu">

<input type="text" name="login">

</td>

</tr>

<tr bordercolor="5A5550" align="center">

<td><img src="img/menu/password.gif"><br>

<input type="password" name="passwd">

</td>

</tr>

<tr bordercolor="#5A5550" align="center"><td class="query" BACKGROUND="img/menu/backgrd.gif"><input type="image" SRC="img/menu/login1.gif" onMouseover="src='img/menu/login2.gif'" onMouseout="src='img/menu/login1.gif'"><a href="newMember.inc.php" target="body" onMouseover="picture1.src='img/menu/register2.gif'" onMouseout="picture1.src='img/menu/register1.gif'"><IMG SRC="img/menu/register1.gif" BORDER=0 NAME="picture1"></a>

</td>

</tr>

</form>

</table>

<center class="query">

<a href="/body.php"

target="body"

onMouseover="mypicture1.src='img/menu/home2.gif'"

onMouseout="mypicture1.src='img/menu/home1.gif'">

<IMG SRC="img/menu/home.gif"


BORDER=0

NAME="mypicture1"></a>

</center>

<?php } else { ?>


<table width="100%" BACKGROUND="img/menu/bg_gamertag.gif" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#5A5550" bgcolor="#000000">

<tr bordercolor="5A5550">

<td class="head" align="center" valign="center">

<h4> <?php echo $_SESSION[login];?></h4>

</td>

</tr>

<?php if ($_
SESSION[securityLevel] == 1 ){ ?>

<tr bordercolor="5A5550">

<td class="head" align="center" valign="center">

<h4> <a href="admin.php" target="_top">Admin</a></h4>

</td>

</tr>

<?php }?>

===============================================================

Right about here i would like to add something like this

<?php if ($_SESSION[securityLevel] == 1 ){ ?>

<input type="text" name="screen shake" onsubmit="launch screenshake>
===============================================================


now the text input box is where i would put the name of the user i want to shake at the bottom i will post the screenshake code so you can view it

security level 1 means admin
===============================================================



</table>

<center class="query">

<a href="menu.php?action=logout"

onMouseover="mypicture2.src='img/menu/logout1.gif'"

onMouseout="mypicture2.src='img/menu/logout.gif'"

onClick="parent.frames[3].location.href='body.php'">

<IMG SRC="img/menu/logout.gif"


BORDER=0

NAME="mypicture2"></a>


<a href="/body.php"

target="body"

onMouseover="mypicture3.src='img/menu/home2.gif'"

onMouseout="mypicture3.src='img/menu/home1.gif'">

<IMG SRC="img/menu/home.gif"


BORDER=0

NAME="mypicture3"></a>


<a href="member.php?memberId=<?php echo $_SESSION[id] ?>"

target="body"

onMouseover="mypicture4.src='img/menu/myxblgl2.gif'"

onMouseout="mypicture4.src='img/menu/myxblgl1.gif'">

<IMG SRC="img/menu/myxblgl.gif"


BORDER=0

NAME="mypicture4"></a>

<a href="search.members.php"

target="body"

onMouseover="mypicture5.src='img/menu/memberlist2.gif'"

onMouseout="mypicture5.src='img/menu/memberlist1.gif'">

<IMG SRC="img/menu/memberlist.gif"


BORDER=0

NAME="mypicture5"></a>


<a href="search.teams.php"

target="body"

onMouseover="mypicture6.src='img/menu/teamlist2.gif'"

onMouseout="mypicture6.src='img/menu/teamlist1.gif'">

<IMG SRC="img/menu/teamlist.gif"


BORDER=0

NAME="mypicture6"></a>


<a href="rankings.php"

target="body"

onMouseover="mypicture12.src='img/menu/rankings2.gif'"

onMouseout="mypicture12.src='img/menu/rankings1.gif'">

<IMG SRC="img/menu/rankings.gif"


BORDER=0

NAME="mypicture12"></a>

</center>

<?php } ?>

<center>


<a href="#"

onClick="window.open('forums.php','forums')"

target="_self"

onMouseover="mypicture7.src='img/menu/forums2.gif'"

onMouseout="mypicture7.src='img/menu/forums1.gif'">

<IMG SRC="img/menu/forums.gif"


BORDER=0

NAME="mypicture7"></a>


<a href="chat/member.php?username=<?php echo $_SESSION[login] ?>"

target="body"

onMouseover="mypicture8.src='img/menu/chat2.gif'"

onMouseout="mypicture8.src='img/menu/chat1.gif'">

<IMG SRC="img/menu/chat.gif"


BORDER=0

NAME="mypicture8"></a>


<a href="tournaments.inc.php"

target="body"

onMouseover="mypicture9.src='img/menu/tourny2.gif'"

onMouseout="mypicture9.src='img/menu/tourny1.gif'">

<IMG SRC="img/menu/tourny.gif"


BORDER=0

NAME="mypicture9"></a>


<a href="/body.php"

target="body"

onMouseover="mypicture10.src='img/menu/links2.gif'"

onMouseout="mypicture10.src='img/menu/links1.gif'">

<IMG SRC="img/menu/links.gif"


BORDER=0

NAME="mypicture10"></a>


<a href="/body.php"

target="body"

onMouseover="mypicture11.src='img/menu/contact2.gif'"

onMouseout="mypicture11.src='img/menu/contact1.gif'">

<IMG SRC="img/menu/contact.gif"


BORDER=0

NAME="mypicture11"></a>

</center>

</body>

</html>
================================================================



<!-- TWO STEPS TO INSTALL SHAKE SCREEN:

  • 1. Copy the coding into the HEAD of your HTML document

  • 2. Add the last code into the BODY of your HTML document -->


  • <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript1.2">

    <!-- This script and many more are available free online at -->

    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin

    function shake(n) {

    if (parent.moveBy) {

    for (i = 10; i > 0; i--) {

    for (j = n; j > 0; j--) {

    parent.moveBy(0,i);

    parent.moveBy(i,0);

    parent.moveBy(0,-i);

    parent.moveBy(-i,0);

    }

    }

    }

    }

    // End -->

    </script>

    </HEAD>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <BODY>

    <center>

    <form>

    <input type=button onClick="shake(2)" value="Shake Screen">

    </form>

    </center>

    <p><center>

    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>

    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

    </center><p>

    <!-- Script Size: 1.09 KB -->
    ================================================================


    i hope this makes it a bit better to see what im trying to do
    Copy linkTweet thisAlerts:
    @shimonJun 23.2004 — ok well...the first thing you'll want to do is stop referring to javascript as 'java' - they are entirely unrelated and do very different things indeed.

    Now then, you have some javascript there that someone downloaded from the internet that apparently makes the browser window wobble a bit. ok. You'll need to bear in mind that that is going to be terribly annoying for your user, even if it does work with their browser. Which it quite possibly won't.

    So my next question is, am i right in thinking that you wish to be able to trigger that remotely?

    For example, let's imagine I'm one of your users, and I'm sat here minding my own business - maybe doing a little surfing, perhaps a bit of work, who knows. And you want to be able to - on demand - make my screen shake?

    If that's what you want to achieve, you won't. You can't force that sort of thing on me using javascript. You can't force me to load that javascript on-demand. You would have to shout across the room, "hey shimon, fire up a browser and visit my shakey page, like now". And you know what reaction that would get.

    So i'm sorry to be pessimistic, but I'm pretty sure this isn't going to happen for you, at least not using javascript and a web browser.
    Copy linkTweet thisAlerts:
    @BonnerJun 23.2004 — *rolling about laughing*

    Javascript that makes "screens" (windows really) shake makes me feel like shaking the person head, who programed it, about.
    Copy linkTweet thisAlerts:
    @bones420authorJun 23.2004 — it is very possible and ive seen it but in this case i think it was triggered from a java chat dont know if its 'java' or 'javascript' so get bent gimp just cause you dont like it dont mean jack.. this is something im asking for help on so if your not going to help dont answer..
    Copy linkTweet thisAlerts:
    @BonnerJun 23.2004 — :eek: ? :mad:
    Copy linkTweet thisAlerts:
    @NaemoJun 23.2004 — Follow this link to get some JAVASCRIPT code that will shake the screen.

    http://javascript.internet.com/bgeffects/shake-screen.html

    This cannot be remotely trigged (well not really).
    Copy linkTweet thisAlerts:
    @BonnerJun 23.2004 — *laughs* I see what you done there.
    Copy linkTweet thisAlerts:
    @bones420authorJun 23.2004 — oh nice good one you got there ... Gimps
    Copy linkTweet thisAlerts:
    @shimonJun 24.2004 — Sure...we're all gimps but you're the one whose homepage weighs in at 2.7MB. Go figure.
    Copy linkTweet thisAlerts:
    @BonnerJun 24.2004 — Yeah, we are 16 year old gimps authoring CSS level 3 specifications. He does not realise who he is actually talking to.
    Copy linkTweet thisAlerts:
    @bones420authorJun 25.2004 — it may be big but we are not catering to 56k users or people who like just text sites.. i asked a simple question and i get bashed.. shows just how good you people are you can do your css level 3 oh so scaredbig deal i know you guys are good or i would not have posted here .. some people might not like what im doing but guess what its not your site and your never gonna use it.. all i need is a little help is that to much to ask
    Copy linkTweet thisAlerts:
    @BonnerJun 25.2004 — Well...

  • 1. Yes it is when people slag us off.


  • 2. We help voluntarily and do not have to help if we do not want. We could better spend time making money out of what we are doing.


  • 3. We offered advice. You could have easily said something like, "I understand your concerns for my website. The screen shaker is just a bit of fun for the visitors so that the website does not feel like all the other websites out there that are not using things like this."


  • Maybe you would like to tell us what you actually want help with. You already have the javascript to make a screen shake. Your request for help was not at all clear and left people confused. You would get more help if people could understand what you were asking to start with.
    Copy linkTweet thisAlerts:
    @bones420authorJun 25.2004 — i understand that and thanks for understanding.. you made it quite clear what im looking for . and i actualy found some code to better do it i made a new post with the new code but now i feel im spamming cause im making multi posts roughly about the same same topic but it is different code .. im ok at some stuff but this is a bit advanced for me and im seeking expirenced help this is why i turned here cause a friend told me people are realy frendly and helpfull .. so here is another snippit of code i grabbed for a site that does do it remotely but i dont know how to trigger it remotly or if i grabbed enough.. this is a function from a .js

    function shake(){

    for (j=4;j>0;j--){

    for (i=5;i>0;i--){

    parent.moveBy(0,i*2);

    parent.moveBy(i*
    2,0);

    parent.moveBy(0,-i*2);

    parent.moveBy(-i*
    2,0);

    }

    }

    }

    top.chatters.modopt.innerHTML += "<a href=javascript:top.read2.km("sh+"+thesubber+"")>Shake Player</a><br>";

    this is a chat triggered screenshake but i would like to turn it to a site triggered.. im guessing +thesubber+ is the users name and i would still like to trigger it from an option only admins can see in the main menu like shown above in a previous post..ive been trying to do this for almost 2 weeks now and this is the closest i can get .im not sure if php could do this or if i would have to use a different type.. i also posted this in the javascript topic and someone said i would need users to have a constant connection.. all i know is as long as they have the site opened i have the session set to 8 hours so they stay connected for 8 hours.. i hope this clearifies a few things ?
    Copy linkTweet thisAlerts:
    @BonnerJun 25.2004 — By remotely, do you mean you making the screen shake on someone else's computer from your computer?
    Copy linkTweet thisAlerts:
    @bones420authorJun 25.2004 — yes i as the admin of the site type in a text box with a submit button a users name if they are logged into my site. to trigger thier screen to shake the site i pulled the part of code from does it in a chat to trigger any users screen to shake i would like to edit it to work outside of my chat to work with any part of my site or if it came down to it somehow implement it into my chat but my chat is a combo of flash and php
    Copy linkTweet thisAlerts:
    @MstrBobJun 26.2004 — One could feasibly do this using a database/user login system. In your user database, you have a field, let's say screen_shake. This is normally set to the value of, say, 0. Now, an admin enters a user's name, presses submit, and the form changes the value to 1. On every page of your website, there is a script that checks the user database for this field value. If it is set to one, then the php prints the javascript, and sets the field back to 0. This will shake the user's screen once they go to a page after the admin sets the value, and won't be instantaneous. Very annoying, and a lot of extra code, but it is feasible. (I'm sure there's probably a better way, though)
    Copy linkTweet thisAlerts:
    @BonnerJun 26.2004 — What you are asking for is not possible through a HTTP connection.

    You need to have another way of communcating with the visitors computer other than HTTP, something like a telnet connection and you need to plant a backdoor into their computer. Only, this is illegal and if I tell you how to do this I will be banned from this forum.

    I recommend you do what has just been suggeted if you really do want to shake people's screens.

    Either that, you can take search google for:

    port tunnelling

    net bios attack

    trojan backdoor

    cracking ports

    and do not forget to take a look at:

    FBI

    computer law

    past cracker sentences

    It was said above what you were asking was practically imposible. It is being said again. You need to know what you are doing to pull this off. This is nothing to do with PHP or web design.
    ×

    Success!

    Help @bones420 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.25,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...