Hi,

My friend is thinking of creating a game in which you hack into a fake safe/vault "A" and once you are in that "safe" you write code/create a firewall to stop the next person getting into that safe behind you (i.e. into safe "A") and then you work on getting into the next safe "B". He asked my advice on how difficult it would be for someone with a good coding knowledge to "hack" into the software of a safe (in game terms) and create a firewall behind them. I know it would proably depend on the level of protection of the software and the firewall and the programmers level but it would be great to know roughly how fesible this game would be i.e. if it would be really easy or only a hand full of people would be able to play it.

I did computer science over 10 years ago and have forgotten most of it (evidently) so I'm not much help to him so any thoughts would be very helpful.

Thanks

jwenting commented: another wannabe script kiddie +0

Thanks for the reply.
The php file creates the folder.
Will "ftp software" solve my problem? I know what ftp is (ie what it stands for), not sure how to use it in relation to this problem though.

Hi,
I hope this is a PHP issue as I miss posted earlier (sorry).
I have created a page for uploading files onto my computer from the internet using PHP.
My page creates a folder to hold the uploaded files in which can be deleted.
BUT once the uploaded file is transfered to this folder I can neither delete the upload file or folder even though they are on my computer.

If I try to delete them I get an "Access denied" message. If I try to change the permissions on them (ie chmod o+w...) I get an "Operation not permitted" message.

The folder is created with :
[COLOR=DarkRed]mkdir("/user/X/pub_html/lectures/$parent_folder/$folder_name", 0755);- [/COLOR] it is owned by nobody (as PHP is owned by nobody) & the permissions on the folder are : drwxr-xrwx

The uploaded file is created with :
[COLOR=DarkOrange]if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{
chmod($uploadfile, 0755);
echo '<p id="message">The file has been uploaded</p>';
}[/COLOR] etc ..

  • it is owned by nobody & the permissions on the files are : -rwxr-xr-x

Any ideas how I might solve this. I have also tried force removing the files with unix commands and using the remove folder PHP command.
Much Thanks,
Sean

Sorry just realized this isn't really a PHP issue.

Hi,
I have an exam page for printing exams that is print friendly.
However some info I dont want appears on the printed page:

(1) the pages url and (2) the date still appears at the end of the page when I print it. Also (3) a page count appears at the top right corner i.e. 'Page 1 of 1'.

Does anyone how to get rid of any of these.
Thanks,
Sean

Hi,
I have a bunch of uploaded files in a folder. Now I want to be able to get the names of these files that are stored in the folder using PHP so that can I create direct links to each file from my page. ie can PHP read the names of files from a folder?

Thanks,
Sean

[QUOTE=paradox814]it's possible to do this in HTML, no need to do this in html, when you make the link simple add a target="_blank" in the anchor text
here is an example:
[code]open link in a <a href="http://www.daniweb.com/" target="_blank">new window</a>[/code]

as far as I know there is no way to do this in PHP, but who cares, html is better in this situation[/QUOTE]

Thanks for the reply. Still having problems getting this code to work though.
So if I wanted to open a txt file called "rte.txt" in a folder called "upload" that is in the same directory as my html page would the code be:

[COLOR=DarkRed]<p>
open link in a <a href="./upload/rte.txt" target="_blank">new window</a>
</p>[/COLOR]

Cheers,
Sean

Hi,
I have text files/notes/pdfs etc in a folder that I want the names of to appear on one of my php pages and then I want the doc/pdf to appear in a seperate browser window (or the same window) when the user clicks on the name. Is this possible using PHP? I have some code to open images like this but beyond that I'm finding it hard to get any information/code.

If anyone knows anything about this or have some code examples or even a link it would be appreciated.
Thanks
Sean

Not sure..
The GUIs call each other but they appear as seperate frames on the screen but that doesnt matter so much as its just a demo and theyre the same size so it seems like they replace each other. All the GUIs are in the same folder.

Its a Taxi service UI and I want to be able to put the taxi order info. into an array and then use that array for when they go onto the "view order" page.

Not sure if any of that answers anything

Hi,
This is my final question on my GUI , I promise.
I wanted to create a global String array that once it was initialized and set in one GUI that it could be accessed by any of the other related GUIs or do I have to pass it from from GUI to GUI, which I'm also not to sure of.

I've checked a few sites but 1 site seems to contradict the other.
Any help would be great.

Thanks,
Sean

Sorry I've asked a question about my GUI already but it's due Monday and I still having a few problems with it....

1.
When the GUIs opens it opens so that I have to change the size manually to view it i.e. the toolbar appears. Is there a way I can get my program to set the size of my GUI so its a decent size when it opens on screen?

2.
Also does anyone know how to make the text of a text field into text type so it can be tested like this
if(textField1 == "John")

I tried if(textField1.getText( ) == "John") but I get an error alert box

Thanks,
Sean

GUI is as follows:

/* Generated by Together */
import javax.swing.JFrame;
import java.awt.event.WindowEvent;
import java.awt.Label;
import java.awt.Button;
import java.awt.Font;
import java.awt.Panel;
import java.awt.TextField;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

public class TaxiGUI extends JFrame {
/** Creates new form JFrame */
public TaxiGUI() {
initGUI();
pack();
}

public static void main(String arg[]) //added
{
TaxiGUI taxi = new TaxiGUI( ); //new
taxi.setVisible(true);
System.out.println("Hello World!");

}

/** This method is called from within the constructor to initialize the form. */
private void initGUI() {
label1.setText("ONLINE TAXI SERVICE");
label1.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 24));
label1.setBounds(new java.awt.Rectangle(2, 1, 466, 53));
label1.setForeground(new java.awt.Color(0, 0, 255));
panel1.setLayout(null);
panel1.add(label1);
panel1.add(label2);
panel1.add(textField1);
panel1.add(label3);
panel1.add(label4);
panel1.add(textField2);
panel1.add(button1);
label2.setText("User Name : ");
label2.setBounds(new java.awt.Rectangle(34, 127, 121, 22));
label2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 20));
label2.setForeground(new java.awt.Color(0, 0, 255));
textField1.setText("");
textField1.setBounds(new java.awt.Rectangle(171, 131, 173, 20));
textField1.setFont(new java.awt.Font("Dialog",java.awt.Font.BOLD,12));
label3.setText("SYSTEM LOGIN");
label3.setBounds(new ...

Brilliant. Thanks

Hi,
I wrote the following GUI. Its total crap but just need to get the basics working first. Its compiles fine and my Hello World test message comes up but no sign of the UI itself. Any ideas at all ?
Much Thanks,
Sean

import javax.swing.JFrame;
import java.awt.event.WindowEvent;
import java.awt.Label;
import java.awt.Button;
import java.awt.Font;
import java.awt.Panel;
import java.awt.TextField;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

public class TaxiGUI extends JFrame {
/** Creates new form JFrame */
public TaxiGUI() {
initGUI();
pack();
}

public static void main(String arg[])
{
TaxiGUI taxi = new TaxiGUI( ); //new
System.out.println("Hello World!");//TEST

}

/** This method is called from within the constructor to initialize the form. */
private void initGUI() {
label1.setText("ONLINE TAXI SERVICE");
label1.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 24));
label1.setBounds(new java.awt.Rectangle(2, 1, 466, 53));
label1.setForeground(new java.awt.Color(0, 0, 255));
panel1.setLayout(null);
panel1.add(label1);
panel1.add(label2);
panel1.add(textField1);
panel1.add(label3);
panel1.add(label4);
panel1.add(textField2);
panel1.add(button1);
label2.setText("User Name : ");
label2.setBounds(new java.awt.Rectangle(34, 127, 121, 22));
label2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 20));
label2.setForeground(new java.awt.Color(0, 0, 255));
textField1.setText("");
textField1.setBounds(new java.awt.Rectangle(171, 131, 173, 20));
textField1.setFont(new java.awt.Font("Dialog",java.awt.Font.BOLD,12));
label3.setText("SYSTEM LOGIN");
label3.setBounds(new java.awt.Rectangle(135, 72, 160, 35));
label3.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 18));
label3.setForeground(new java.awt.Color(255,0,0));
label4.setText("Password :");
label4.setBounds(new java.awt.Rectangle(35, 174, 124, 27));
label4.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD,20));
label4.setForeground(new java.awt.Color(0,51,255));
addWindowListener(
new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
getContentPane().add(panel1, java.awt.BorderLayout.CENTER);
textField2.setText("");
textField2.setBounds(new java.awt.Rectangle(170, 180, 176, 22));
textField2.setFont(new java.awt.Font("Dialog",java.awt.Font.BOLD,12));
button1.setLabel("- LOGIN -");
button1.setBounds(new java.awt.Rectangle(169, 232, 122, 33));
button1.setFont(new java.awt.Font("Book Antiqua", java.awt.Font.BOLD, 18));
button1.setForeground(new java.awt.Color(255,0,0));
button1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e){button1ActionPerformed(e);}});
}

/** Exit the Application */
private void exitForm(WindowEvent evt) {
System.exit(0);
}

public void button1ActionPerformed(ActionEvent ...