Jump to content
Sign in to follow this  
barsa

Need an Idea

Recommended Posts

Hi. I am not a newbie but I want to make a personal webpage, but here is the trick part: Inside the page i want to put a frame, (something like a iframe) where i like to put something like a command line. For example: if i type "goto home.php" the browser will go to that page.

 

If i type "retrieve fis.ext" --> start download of fis.ext

and so on....

 

My asking is:

 

-how do i make the browser to know what i type in? Or better, i need a program that runs on background and capture the text that i type there , interpret the text and make a decision ?

 

 

Thank you.

Share this post


Link to post
Share on other sites

Need idea ?? - but it can be done using some SSI or SSS to accept/process commands, I can give you only HINT, However it does no form validation etc so watch what you do with it.

 

you can validate yourself from w3. Here is a basic code for your idea ( Resevered for mathgirl) Dont for get to put

 

//begin instances from mathgirl coding

 

++++++++++++++++++++++++++++++++++++++++++++++

 

//this code is reserved on mathgirl , here it begins, DO NOT EDIT THIS LINE

 

<?php

 

//get the information from POST

$post_cmd = $_POST['cmd'];

 

//if it exsists then do stuff

if($post_cmd)

{

//break it apart at the space

$cmds = explode(" ", $post_cmd);

 

//info is stored in an array called $cmds with cmds[0] being like 'goto'

//just add more elseif's for more commands and change what each command does if needed

//these are simply using a bit of JScript to redirect page but you could also use header();

if($cmds[0] == "goto") { ?>

<script LANGUAGE="JavaScript">

<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development

window.location="<?php echo $cmds[1]; ?>";

// -->

<?php }

 

elseif($cmds[0] == "retreive") { ?>

<script LANGUAGE="JavaScript">

<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development

window.location="<?php echo $cmds[1]; ?>";

// -->

<?php }

 

else { ?>

<script LANGUAGE="JavaScript">

<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development

window.location="error.php";

// -->

<?php }

}

 

?>

 

Cmd Line Type Thingy - by v_Ln

 

<!-- Some CSS to make the boxes look right -->

<!--

textarea {

font-family: "Courier New", Courier, mono;

font-size: 12px;

color: #00FF00;

background-color: #000000;

border: thin inset #CCCCCC;

}

input {

font-family: "Courier New", Courier, mono;

font-size: 12px;

color: #00FF00;

background-color: #000000;

border: thin inset #CCCCCC;

}

-->

 

 

<!-- The main form, fairly simple -->

 

 

 

 

 

 

 

 

 

 

// The end , this is only face you can change it by youself or you 'l see my name all over and over :-)

 

// code end

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Share this post


Link to post
Share on other sites
( Resevered for mathgirl) Dont for get to put

 

//begin instances from mathgirl coding

 

++++++++++++++++++++++++++++++++++++++++++++++

 

//this code is reserved on mathgirl , here it begins, DO NOT EDIT THIS LINE

 

HA HA HA HA HA!! is this suppose to be a joke? it cracked me for real. BTW Is your code suppose to freeze the machine up??:P k garne afu lai ta php bhanekho pani tahah nai chaina. jamana ma nukes portal hardcode ta garekho ho. khai testai hokhi? mathgirl ta kasto intelligent raicha.:P:P

Edited by lucifer

Share this post


Link to post
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...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.