A Digital Age Deserves A Digital Leader

"Stealing" PHP & ASP code

"Stealing" PHP & ASP code

Postby Azhar » Sat Jul 24, 2004 1:11 pm

Hi,

Does any1 know how I can see people's PHP & ASP code, from a website, as it doesn't show up in view source. I think this is because PHP & ASP runs on the server, not on the client PC, anyway, it's not like i want to "steal" code, just to have a look nd learn ;)

Any help greatly appreciated ;)


Azhar
PRO Level 2
User avatar
Posts: 46
Joined: Tue Jul 13, 2004 10:39 am
Location: United Kingdom

Postby ch00k » Sat Jul 24, 2004 1:25 pm

There is one way that may work. Type ::DATA or ::$DATA (I think) at the end of the url. This sometimes tells the code that you want to download it (for ASP).

The other side is run a search on google for asp and php source code. I have just reformted my machine so lost all my links (got them at work but not at home). Will send them in a couple of days.
Why is it drug addicts and computer afficionados are both called users?
PRO Level 2
User avatar
Posts: 38
Joined: Thu Jul 22, 2004 3:40 am
Location: Sydney, Australia

Postby Weaver » Sat Jul 24, 2004 1:46 pm

It is going to be very difficult to do this as both PHP & ASP are not setup to allow remote web users access to the source code. If it were, this would be a major security threat. Nevertheless there are methods (sometimes legit, sometimes shady) of viewing the source code remotely.

Most of the methods would be considered "hacking" and thus will not be talked about here, but sometimes changing the extension to .phps will give you the file in source format for PHP at least. If the web administrator has setup .phps, the file will be parsed and displayed as source instead of parsed and run. For example, if you are at a site and requesting a file call index.php, changing that to index.phps may give you the source. Note: this will probably work less than 1% of the time, but it never hurts to try.

If you really want to learn PHP, there are plenty of good scripts available online. Hotscripts.com is a great place for half-way decent code of all types. Personally, I think you should pick up a good book if you are really interested in learning to program. A good book is better than all the tutorials in the world combined.

In addition, if you get stuck there are people (like myself) who are familiar with programming. My personal realm is PHP, C, and C++. I have some experience with other languages but nothing serious. You can always post questions here on the forum. The important thing to keep in mind when posting is that you should make sure to thoroughly debug and test out the problem first. Then make sure to post the question appropriately. Posting a bunch of source code is only warranted when it is asked for or in certain cases. Otherwise, keep the source posted to the specific task at hand.

-Weaver
Public Keys

The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
PROfessional Member
User avatar
Posts: 1967
Joined: Wed Jun 19, 2002 12:05 am
Location: /home/weaver/

Postby QContinuum » Sun Oct 31, 2004 10:26 pm

I dont know much about PHP or ASP but i do know that it is processed server side. That means the only thing you get in view source is pure HTML. As for "stealing code" i find it dishonorable and would rather recomend you use Open Source code or code freely distributed to learn. There is some good code out there.
PRO Level 2
User avatar
Posts: 15
Joined: Sun Oct 31, 2004 8:43 pm
Location: MI, USA

Postby alphagamma212 » Sun Nov 07, 2004 1:51 am

For PHP and ASP, because it is server side scripting, the only legit way to get it would be to ask the webmaster. If it is for a legitimate reson, most people will give you the code as long as it doesn't give away important things (e.g. mySql username and password)
alphagamma212

Postby highmtncntry » Mon Nov 08, 2004 9:19 pm

I myself being a webmaster for quite a few years, have done my website in both ASP and PHP. Both scripts have good and bad qualities, it just really depends on what you are wanting your site to do and have. ASP is good for a lot of dynamic content but requires some end programs to run large databases and can be quite complex. PHP on the other hand is very useful when you are using SQL along side of it for your databases.
PRO Level 2
User avatar
Posts: 13
Joined: Sat Nov 06, 2004 6:21 pm
Location: Everett, WA

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests