How to view the PHP source code of a website?
Solved/Closed
Yakurena
-
Gatesson -
Gatesson -
Good evening,
When I want to display the source of a web page, I only see HTML, even when the page is dynamic (and thus also contains PHP). PHP may not be directly accessible to the "client", so how can I display it?
Thank you in advance.
When I want to display the source of a web page, I only see HTML, even when the page is dynamic (and thus also contains PHP). PHP may not be directly accessible to the "client", so how can I display it?
Thank you in advance.
23 réponses
- 1
- 2
Suivant
Hi, impossible...
The PHP is executed on my server and is therefore sent to you in plain language.
You will never see the source code of a PHP page (which is normal, because for security reasons, it wouldn't be possible as you could then see the connections to the database...)
So as a normal user, you don't have access to that code ;)
Good evening!
.: Dimi_be :.
The PHP is executed on my server and is therefore sent to you in plain language.
You will never see the source code of a PHP page (which is normal, because for security reasons, it wouldn't be possible as you could then see the connections to the database...)
So as a normal user, you don't have access to that code ;)
Good evening!
.: Dimi_be :.
I’m summarizing it once and for all, I hope: it is impossible to see the PHP sources of a site!!!
It’s very simple to understand when you know the client/server model.
1. The client sends an HTTP request to the web server listening on port 80 (by default)
2. The server receives the request and processes it
3. The server executes the PHP sources with the PHP interpreter
4. The server sends the sources to the client
5. The client’s rendering engine repeats this model until it has all the files (JS, images, ...) and transforms the sources into a visual result
Steps 2, 3, and 4 being on the server, you do not have the right to modify them → through the HTTP protocol, it is impossible to retrieve the sources.
--
Your computer does not do what you want... but what you tell it to do.
It’s very simple to understand when you know the client/server model.
1. The client sends an HTTP request to the web server listening on port 80 (by default)
2. The server receives the request and processes it
3. The server executes the PHP sources with the PHP interpreter
4. The server sends the sources to the client
5. The client’s rendering engine repeats this model until it has all the files (JS, images, ...) and transforms the sources into a visual result
Steps 2, 3, and 4 being on the server, you do not have the right to modify them → through the HTTP protocol, it is impossible to retrieve the sources.
--
Your computer does not do what you want... but what you tell it to do.
I correct, the server does not send the "sources" to the client.
The PHP interpreter (Zend Engine) in most cases "translates" the PHP code into HTML and it is therefore HTML that is sent to the client. It is easy to understand that since PHP remains on the server, as a client we obviously do not have access to it.
The PHP interpreter (Zend Engine) in most cases "translates" the PHP code into HTML and it is therefore HTML that is sent to the client. It is easy to understand that since PHP remains on the server, as a client we obviously do not have access to it.
No. It displays the interpreted PHP page.
Egg Zakt :)
It’s also like typing "view-source:" in front of the URL in the browser’s address bar, or using the browser's own display options...
Egg Zakt :)
It’s also like typing "view-source:" in front of the URL in the browser’s address bar, or using the browser's own display options...
I have been an IT professional for 35 years, I’ve been programming in PHP for 5 years, and as such, I am open source; many scripts are available on the web and with a bit of know-how, it's easy to manage a connection, administer a database via forms, etc. In short, create your own site, put in the effort, and you will always find pros to lend you a hand online. There's no point in trying to hack a website or code; moreover, I remind you that intellectual property rights are no joke. (I faced the consequences a few years ago, and the penalties are severe).
I also advise all of you not to use the JPG format, which under international law is not free, whereas the PNG format is equally good and free of all rights. Looking forward to hearing from you.
WEBBRICOLEUR.
I also advise all of you not to use the JPG format, which under international law is not free, whereas the PNG format is equally good and free of all rights. Looking forward to hearing from you.
WEBBRICOLEUR.
Instead of polluting other people's topics, create your own
And remember to disable the "Caps Lock" key!!!
--
Your computer doesn't do what you want... but what you tell it to do.
And remember to disable the "Caps Lock" key!!!
--
Your computer doesn't do what you want... but what you tell it to do.
No choice, you'll have to ask for the FTP access codes to the site you will be maintaining... or ask the former site administrator to give you the PHP source files.
....or you start over everything :-D
....or you start over everything :-D
Kilian, a beginner in the background task.....
l'extension phps allows you to display the source code of a PHP file. For example, if you want to share your PHP source code with a teammate, you need to make a copy of your PHP file, but this time with the .phps extension. For example, connexion.phps will display the source code of connexion.php in the browser.
The problem is that in this case, I need access to modify it: in fact, I need to improve a project completed a year earlier in PHP/MySQL. I have installed the directories containing the already created files (some of which are in PHP); I downloaded EasyPHP, which allowed me to easily access the web pages of the corresponding files, but to modify them, I need to have access to the PHP code. So what should I do?
No. It displays the interpreted PHP page.
And it's the same with show_source() in PHP.
And it's the same with show_source() in PHP.
Kilian, beginner in background tasks.....
And it also comes down to using a web page scraper.
No matter what we do, if we request a PHP file on a web server that supports PHP, it will always interpret it.
At least that's what I conclude from it.
No matter what we do, if we request a PHP file on a web server that supports PHP, it will always interpret it.
At least that's what I conclude from it.
Kilian, beginner in background tasks.....
<HTML><HEAD><TITLE></TITLE></HEAD>
<BODY>
<script type="text/javascript">
var url="http://marcel-bultez.chez.tiscali.fr/initial/gm.php";
window.location="view-source:"+url;
</script>
</BODY></HTML>
displays the php, for example ... right?
<BODY>
<script type="text/javascript">
var url="http://marcel-bultez.chez.tiscali.fr/initial/gm.php";
window.location="view-source:"+url;
</script>
</BODY></HTML>
displays the php, for example ... right?
It's funny, when I create a PHP page, I can't see the sources from the client with any scripts whatsoever!
Have you tried creating a PHP script and displaying the sources with JavaScript?
If you can do that, it means PHP has a huge flaw!
Don't forget:
PHP => Server.
JavaScript => Client.
The result of what you send is done by your browser.
JavaScript and PHP do not communicate with each other.
Have you tried creating a PHP script and displaying the sources with JavaScript?
If you can do that, it means PHP has a huge flaw!
Don't forget:
PHP => Server.
JavaScript => Client.
The result of what you send is done by your browser.
JavaScript and PHP do not communicate with each other.
Hi
my project is the creation of a website and I need a PHP script for deletion and modification:
to add a photo and enter the information (date, description).
the deletion of photos and the modification of the description; please help me it's very urgent and important
thank you in advance
my project is the creation of a website and I need a PHP script for deletion and modification:
to add a photo and enter the information (date, description).
the deletion of photos and the modification of the description; please help me it's very urgent and important
thank you in advance
You can do this with this player.
And here is the generator for the code to insert.
You can also try with this.
--
Your computer doesn’t do what you want... but what you tell it to do.
And here is the generator for the code to insert.
You can also try with this.
--
Your computer doesn’t do what you want... but what you tell it to do.
Vous devriez essayer ceci :
http://webmagz.net/2012/03/php-showing-source-code-instead-rendering-page-fix/
http://webmagz.net/2012/03/php-showing-source-code-instead-rendering-page-fix/
with an ftp,
transfer the sources of the site => local,
make the modifications,
transfer the sources local => the site
however dimi_be we can perfectly
view and process the sources of a site
in javascript for example:
window.location="view-source:source address";
there are other solutions in javascript, and with
other languages.
@+
transfer the sources of the site => local,
make the modifications,
transfer the sources local => the site
however dimi_be we can perfectly
view and process the sources of a site
in javascript for example:
window.location="view-source:source address";
there are other solutions in javascript, and with
other languages.
@+
JavaScript is code executed on the client side, so there are no source issues.
In any case, if it is possible to see the PHP source code from the client, it’s a disaster, because you control nothing in that case and everything that is hidden is visible (connections, keys, ...) => therefore, it is impossible to read the source code from a browser.
Tafiscobar "lou waye def bopame"
Nullity does not exist, ignorance does, oh I suppose!!!
In any case, if it is possible to see the PHP source code from the client, it’s a disaster, because you control nothing in that case and everything that is hidden is visible (connections, keys, ...) => therefore, it is impossible to read the source code from a browser.
Tafiscobar "lou waye def bopame"
Nullity does not exist, ignorance does, oh I suppose!!!
HOW CAN I DO LIKE THIS SITE http://www.livingelectro.com (check the player)
I want to use my sound: https://www27.zippyshare.com/v/93482518/file.html
and do like this site: http://www.livingelectro.com
.:! IF YOU DIDN'T UNDERSTAND SORRY CAN'T EXPLAIN BETTER !:. PLEASE HELP ME!!!!!!!
I want to use my sound: https://www27.zippyshare.com/v/93482518/file.html
and do like this site: http://www.livingelectro.com
.:! IF YOU DIDN'T UNDERSTAND SORRY CAN'T EXPLAIN BETTER !:. PLEASE HELP ME!!!!!!!
- 1
- 2
Suivant