Getting source from php on website

  • (2 Pages)
  • +
  • 1
  • 2

22 Replies - 1024 Views - Last Post: 29 July 2011 - 06:45 AM Rate Topic: -----

#1 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Getting source from php on website

Posted 28 July 2011 - 09:37 AM

Does anybody know how to get the source of a php page on a website that is not mine? Please be a little noob friendly as I am not great with php. The last time I was on this site was in 2009.

This post has been edited by MysteriousFeez: 28 July 2011 - 09:37 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Getting source from php on website

#2 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:39 AM

Simple answer, you can't.
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10823
  • View blog
  • Posts: 40,349
  • Joined: 27-December 08

Re: Getting source from php on website

Posted 28 July 2011 - 09:42 AM

Expanding a little, PHP runs on the server side, not the client side. So the source you can get is the HTML output on the webpage, which is on the client side.
Was This Post Helpful? 3
  • +
  • -

#4 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:42 AM

View PostEnvXOwner, on 28 July 2011 - 10:39 AM, said:

Simple answer, you can't.


I have done it on accident before, it asked me to open the page with the default thing to open php files, but I was able to open it in a text editor too. Is there a way to disable php so it does not know what to open the page with so it prompts me?
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10823
  • View blog
  • Posts: 40,349
  • Joined: 27-December 08

Re: Getting source from php on website

Posted 28 July 2011 - 09:43 AM

It sounds like you don't have PHP installed on the local system you are running it on.
Was This Post Helpful? 0
  • +
  • -

#6 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:44 AM

The PHP was more than likely displaying as plain text due to a problem with your PHP installation.
Was This Post Helpful? 0
  • +
  • -

#7 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:45 AM

View Postmacosxnerd101, on 28 July 2011 - 10:43 AM, said:

It sounds like you don't have PHP installed on the local system you are running it on.


But I do.

View PostEnvXOwner, on 28 July 2011 - 10:44 AM, said:

The PHP was more than likely displaying as plain text due to a problem with your PHP installation.


Well the php was from my antivirus, it implements php on every page I visit to check if the page is safe.
Was This Post Helpful? 0
  • +
  • -

#8 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:46 AM

You obviously can't disable PHP on a remote server.

I think you're misunderstanding what PHP is (yay second time I've said that today!).

It's a server side language, nothing to do with PHP is sent down to the browser. ONLY the output generated by PHP will be output to the browser and nothing more, all parsing of the PHP file is done server side and is nothing to do with your browser.

There is no way to make it prompt you to stop the server's processing as this would obviously be a massive security hole.

EDIT: And your anti-virus will not "put php on every page", lol

This post has been edited by RudiVisser: 28 July 2011 - 09:46 AM

Was This Post Helpful? 0
  • +
  • -

#9 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:47 AM

View PostRudiVisser, on 28 July 2011 - 10:46 AM, said:

You obviously can't disable PHP on a remote server.

I think you're misunderstanding what PHP is (yay second time I've said that today!).

It's a server side language, nothing to do with PHP is sent down to the browser. ONLY the output generated by PHP will be output to the browser and nothing more, all parsing of the PHP file is done server side and is nothing to do with your browser.

There is no way to make it prompt you to stop the server's processing as this would obviously be a massive security hole.

EDIT: And your anti-virus will not "put php on every page", lol


I do not mean disable the php on the remote server, but to keep it from running on my pc so my computer does not know how to run it so it asks me.
Was This Post Helpful? 0
  • +
  • -

#10 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:49 AM

This is my point.

Your computer does not run PHP.
Was This Post Helpful? 0
  • +
  • -

#11 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:50 AM

You can't keep it from running on your PC since your PC is not running it, only displaying the output.
Was This Post Helpful? 0
  • +
  • -

#12 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:50 AM

View PostRudiVisser, on 28 July 2011 - 10:49 AM, said:

This is my point.

Your computer does not run PHP.


There has got to be a way, but just not many people know about it.
Was This Post Helpful? -1
  • +
  • -

#13 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:51 AM

*
POPULAR

View PostMysteriousFeez, on 28 July 2011 - 05:50 PM, said:

There has got to be a way, but just not many people know about it.

Oh my.

No, there is not a way.

I'll repeat what has been said a few times in this thread. The PHP is NEVER sent to you, EVER.

The SERVER parses the PHP, not you.
Was This Post Helpful? 5
  • +
  • -

#14 MysteriousFeez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 20-September 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:52 AM

View PostRudiVisser, on 28 July 2011 - 10:51 AM, said:

View PostMysteriousFeez, on 28 July 2011 - 05:50 PM, said:

There has got to be a way, but just not many people know about it.

Oh my.

No, there is not a way.

I'll repeat what has been said a few times in this thread. The PHP is NEVER sent to you, EVER.

The SERVER parses the PHP, not you.



Maybe you can change that? No I am just kidding, but alright thanks for helping.
Was This Post Helpful? 1
  • +
  • -

#15 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Getting source from php on website

Posted 28 July 2011 - 09:53 AM

I think you're looking for Javascript man, which is displayed in the browser because the client parses the Javascript.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2