Computing.Net > Forums > Web Development > Really dumb question

Really dumb question

Reply to Message Icon

Original Message
Name: AmericanSlon
Date: July 13, 2004 at 20:25:07 Pacific
Subject: Really dumb question
OS: Win xp
CPU/Ram: Ahtlon Xp 2800+, 1gig
Comment:

Hey guys I have a really n00b question.
If for example an .html file has a <form> which is being processed by something.adp or something.php or any other file how do I download that file on my comp if I know the location of it?


Report Offensive Message For Removal

Response Number 1
Name: -Bryan-
Date: July 14, 2004 at 01:41:06 Pacific
Subject: Really dumb question
Reply: (edit)

You don't.


Report Offensive Follow Up For Removal

Response Number 2
Name: philiprobert
Date: July 14, 2004 at 01:41:18 Pacific
Subject: Really dumb question
Reply: (edit)

Hey AmericanSlon-

No such thing as a stupid question; seriosly.

Example:
<form method="post" action="senddata.php">
...
</form>

You might try copy/pasting the full path of the php/pl/js/etc file into your browser.

In the formentioned example, it would be http://www.somesite.com/senddata.php" and then your browswer should ask what to do with the file if it doesn't actually display it. Hope this helps.

It isn't the size of the dog in the fight. It's the size of fight in the dog.


Report Offensive Follow Up For Removal

Response Number 3
Name: -Bryan-
Date: July 14, 2004 at 01:55:49 Pacific
Subject: Really dumb question
Reply: (edit)

Actually Philip, that shouldn't work. To clarify my first post, PHP is processed by the server before the output is sent to your browser.

There is no way that I know of to view the source code without having access to the original source (php) file.


Report Offensive Follow Up For Removal

Response Number 4
Name: FBI Agent
Date: July 14, 2004 at 11:21:21 Pacific
Subject: Really dumb question
Reply: (edit)

bryan, i must say, you're n00b or something. what phillip says works just fine with my computer. if that doesnt work for you Slon, then you could use a php script to take the contents of the file and put it on a webpage, something like

<?php
$contents = file_get_contents("LOCATION OF WEBSITE");
echo $contents;
?>

i actually have a script that i made to do this that has a textbox that it echos the contents to so that it looks a LOT better, but that should work just fine, if it doesnt then ill place my script in here if you reply

FBI_Agent


Report Offensive Follow Up For Removal

Response Number 5
Name: SN
Date: July 14, 2004 at 16:12:01 Pacific
Subject: Really dumb question
Reply: (edit)

"bryan, i must say, you're n00b or something."
As I've said to you before, you need to do some homework before you start putting people down. Bryan is absolutely right, you are absolutely wrong.

"what phillip says works just fine with my computer."
No it doesn't.

Unless the server is set up incorrectly, it will always just return the output of the script, not the actual code it's running. To do otherwise would be an enormous security risk. The obvious exception is client side code, which is viewable by the method philip mentioned (although you wouldn't get the path from the form tag.)

-SN


Report Offensive Follow Up For Removal


Response Number 6
Name: FBI Agent
Date: July 14, 2004 at 21:43:02 Pacific
Subject: Really dumb question
Reply: (edit)

SN, you're wrong. with my computer, i go to the php page and then i view the source and it works just fine.

As I've said to you before, you need to do some homework before you start putting people down

so how about you go and do your homework for a change, baby

FBI_Agent


Report Offensive Follow Up For Removal

Response Number 7
Name: SN
Date: July 15, 2004 at 06:07:22 Pacific
Subject: Really dumb question
Reply: (edit)

Show me one script you downloaded using this method. Maybe you would be so kind as to give me the source code to this forum's form handler, for example:
<FORM METHOD=POST ACTION="http://computing.net/cgi-bin/mycomputingadd.pl">

Sorry FBI Agent, but I'm not wrong.

-SN


Report Offensive Follow Up For Removal

Response Number 8
Name: Don Arnett
Date: July 15, 2004 at 07:43:50 Pacific
Subject: Really dumb question
Reply: (edit)

FBI - what you are seeing is the HTML output by the PHP program, not the PHP itself.

Using SN's example above (..../mycomputingadd.pl), when you put in this URL, you will see in your browser the HTML that is output by mycomputingadd.pl. If you were seeing the actual .pl file, then you would see a bunch of Perl code.


Report Offensive Follow Up For Removal

Response Number 9
Name: FBI Agent
Date: July 15, 2004 at 10:55:11 Pacific
Subject: Really dumb question
Reply: (edit)

lol, well i've never tried stealing anybody's php/perl scripts before but i know it works when i try and use it on my stuff. that script that i mentioned above is how i view sources of websites that dont allow you to view their source, even if you go to view>source. i've never tried to steal peoples scripts so i dont know how it'll work that way... i guess it wouldnt ;)

FBI_Agent


Report Offensive Follow Up For Removal

Response Number 10
Name: Don Arnett
Date: July 15, 2004 at 11:48:37 Pacific
Subject: Really dumb question
Reply: (edit)

You sure seem to be in the mood to insult people, FBI Boy. First, you call Brian a newbie, then SN a baby, and now call me a thief.

Yet you say "that script that i mentioned above is how i view sources of websites that dont allow you to view their source"

How is that different than what you called 'stealing scripts'??


Report Offensive Follow Up For Removal

Response Number 11
Name: SN
Date: July 15, 2004 at 15:52:14 Pacific
Subject: Really dumb question
Reply: (edit)

"that script that i mentioned above is how i view sources of websites that dont allow you to view their source"

Do we have to say it again? That is viewing the OUTPUT of the script, not the CODE of the script. If you don't understand the difference between output and code, or server-side scripts and client-side scripts, then you calling brian a newbie is the equivalent of a fish calling a bird wet.

-SN


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Really dumb question

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software