Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

How on internet can one view the actual code of a .php page ?

 
webmaster forum
Activity
0%
 
New Poster
Posts: 12
Topics: 7
October 04, 2008, 09:21:40 PM

To view the actual codes of a .php page on the internet, what should be done during the content viewing of the page...?

 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
October 06, 2008, 04:23:23 AM

I dont think that this is possible (but would like to know if it is!) The reason is that when you request a php page, the webserver will execute the php script and then send to you what this script generates (which is usually HTML.) As this is a server side operation, all your machine knows is the output sent by the server (which is produced by the php) and not the php itself.

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Poster
Posts: 12
Topics: 7
October 06, 2008, 11:56:13 AM

Thank you very much for telling that but but somewhere i read on the net itself this can be done, but no reliable source till now has got to me so that i can know the details
 
webmaster forum
greatjoe  Offline
Activity
0%
 
New Poster
Posts: 4
Topics: 2
October 07, 2008, 07:57:48 AM

Thank you very much for telling that but but somewhere i read on the net itself this can be done, but no reliable source till now has got to me so that i can know the details

I don't think there's a way to view the actual php codes, cause the php code ( file ) relied on the server, meaning that all the php is handled by the php engine on the server which then ouputs the result as a html page..
So except you go to the server and get to the file, you have NO other way to view the php code..
 
webmaster forum
jaguar84  Offline
Activity
0%
 
New Poster
Posts: 5
Topics: 1
October 13, 2008, 02:15:20 AM

Thank you very much for telling that but but somewhere i read on the net itself this can be done, but no reliable source till now has got to me so that i can know the details

I don't think there's a way to view the actual php codes, cause the php code ( file ) relied on the server, meaning that all the php is handled by the php engine on the server which then ouputs the result as a html page..
So except you go to the server and get to the file, you have NO other way to view the php code..


Yes that's it, there is no way to see the PHP script from your browser, it is the same with all other scripting languages not only with PHP, all you can see from your browser is the HTML, CSS, javascript and some other small stuff.
 
 
webmaster forum
bundyxc  Offline
Activity
0%
 
New Poster
Posts: 12
Topics: 2
December 21, 2008, 12:50:28 AM

If people could see PHP, the internet would be a lot more vulnerable to hackers. As it is, hackers just have to make educated guesses as to what the PHP code states. If a hacker could read the PHP, then they could just launch an attack based on what they read, as opposed to having to make educated guesses. Smiley
 
webmaster forum
Activity
0%
 
New Poster
Posts: 10
Topics: 1
January 07, 2009, 10:59:33 AM

You cannot PHP is a scripting language and its a script it runs and you dont see it again till you run it you would actually have to download it and you dont its run on the webserver and the data is sent to you

It would be a major security risk if you could view PHP on a live website
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
January 07, 2009, 11:12:05 AM

You cannot

Never say never! The only way I can think of off the top of my head, and it's cheating a bit, is to ssh or ftp into the webserver (and hope there is a guest or anonymous account to allow this) and also hope that the PHP script in question has not been secured properly so that you can view the contents..... bit of a long shot though Wink

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Poster
Posts: 1
Topics: 0
January 19, 2009, 04:46:06 AM

i think their is no manual way out of this to view the actual php code on internet for this you have copy all the contents of a website using any copier software
 
webmaster forum
Activity
0%
 
New Coder
Posts: 26
Topics: 12
January 21, 2009, 04:40:51 AM

No theres no chance for viewing the codes of the php script...
unless you will hack it to view the codes...
you can use a source code viewer but its just viewing the page code that will be generatedand not the actual script code!
 
webmaster forum
leonle  Offline
Activity
0%
 
New Poster
Posts: 11
Topics: 0
January 24, 2009, 06:18:08 PM

I searched it on other sites and mostly many say it cannot be done  notworthy
 
webmaster forum
Activity
0%
 
New Coder
Posts: 42
Topics: 4
WWW
July 23, 2009, 07:18:29 AM

I can tell you for sure that it cannot be done. And I'll tell you why:
PHP is a server side scripting platform. All the PHP code is run on the servers and then outputted to the client (your browser) as regular html.
The simple reason this is not possible is security, and of course because it IS on the server.
Hope this helps  Cheers

www.m-forums.com - The broadest finance-related discussion forum.
We have just launched and need people to join and contribute. Help is greatly appreciated Smiley
 
webmaster forum
Activity
0%
 
New Coder
Gender: Male
Posts: 39
Topics: 0
WWW
August 15, 2009, 07:04:22 PM

The closest thing to being able to see the PHP code of a file is to use a .phps file, which applies syntax highlight to the PHP code in the file. There has to be an actual .phps file though, so you can't just stick the s on the end of index.php in a URL or anything like that.

Phantasy Star: Fringes of Algo | Castle Nintendo - Discussion Community
 
webmaster forum
amccloud  Offline
Activity
0%
 
New Poster
Posts: 14
Topics: 3
September 03, 2009, 10:37:13 AM

This is def NOT possible under normal circumstances! I the only time a .php file will render in plaintext is if apache is serving it as plaintext. I remember when Facebook had their little goof up.  http://www.techcrunch.com/2007/08/11/facebook-source-code-leaked/
 
webmaster forum
Activity
0%
 
New Poster
Posts: 11
Topics: 1
September 04, 2009, 08:02:04 PM

File > Save page as > Open in Notepad

This will work in firefox if you want to view the code of a page and save a copy of it offline, and have the images for it too.
 
webmaster forum
Activity
0%
 
Professional Coder
Real name: Odusee
Location: Australia
Gender: Female
Posts: 458
Topics: 47
WWW
June 07, 2011, 01:24:31 AM

You cannot view anyone's site codes. That would be very unfair for the developer and the site owner for making and buying the site. Though you can see some of the codes buy not all of them. Try do discover more of PHP Cheesy

Find it all at ONE Address~ Check it Out!
 
webmaster forum
Life Is Good!
Activity
0%
 
Professional Coder
Gender: Female
Posts: 242
Topics: 3
WWW
June 09, 2011, 07:03:57 AM

php is a server side scripting so there is no way you can view it.. not yet.. Smiley

Affordable Custom Web Design Services
 
webmaster forum
Kevin  Offline
A computer Science student
Dream - To become a computer expert
Activity
26.67%
 
Skilled Coder
Real name: Kevin
Location: India
Gender: Male
Age: 18
Posts: 199
Topics: 51
kevin.cmaker
June 09, 2011, 10:19:40 AM

Yes, I agree with u people! PHP code is executed by the server itself (which is located miles away from u) and so how can u see it?

However, its not at all a matter for hackers like Kevin Mitnik who has spent years in jail for hacking. Smiley

Glad to help.

A TechnicalTalk member!
 
webmaster forum
Activity
0%
 
Professional Coder
Real name: Odusee
Location: Australia
Gender: Female
Posts: 458
Topics: 47
WWW
June 09, 2011, 11:50:57 PM

Yes, I agree with u people! PHP code is executed by the server itself (which is located miles away from u) and so how can u see it?

However, its not at all a matter for hackers like Kevin Mitnik who has spent years in jail for hacking. Smiley

oh no! hahahaha. I would at least find my own way in creating my own php rather than hacking the server O_O

Find it all at ONE Address~ Check it Out!
 
webmaster forum
eminent  Offline
Activity
0%
 
New Poster
Posts: 5
Topics: 1
June 11, 2011, 08:17:25 AM

To me i am very very sure that it is not possible to view it online
 
webmaster forum
john14317  Offline
Activity
0%
 
Skilled Coder
Posts: 149
Topics: 0
July 10, 2011, 11:41:09 PM

Also noting that if your starting to learn PHP i would practise on less complex ecommerce systems then zencart.

payday loans
instant online cash advance
 
webmaster forum
Abbey  Offline
Activity
0%
 
New Poster
Posts: 5
Topics: 0
WWW
August 11, 2011, 12:40:25 AM

How do you view PHP as a webpage?
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 01, 2012, 07:17:29 PM