0

So,

Say there's a remote PHP file that's generating some output in JavaScript.
I can do <script src='some_file.php type='text/javascript'></script>, and the code will run, but when I click View Source it just shows the above code. Is there any way I can access the actual code that that PHP file is running?

Also, when I right click on the output of the javascript and go to 'this frame' -> 'view frame source' I get the actual output. I want to be able to use it.

6
  • Your question is unclear. What exactly do you want? Commented Oct 2, 2011 at 1:52
  • If that was possible, every website using PHP will be DOOMED. Commented Oct 2, 2011 at 1:53
  • It's for an advertising script. It's a php script with a bunch of shit in it, loaded via javascript. the script shows links to advertisements. i want to be able to access those links w/o clicking on them. Commented Oct 2, 2011 at 1:56
  • i.e. rs-downfall.com/scripts/src.htm Commented Oct 2, 2011 at 2:00
  • I don't understand: the second-last sentence in your question says "I get the actual output", so haven't you already got what you want? Commented Oct 2, 2011 at 2:16

2 Answers 2

5

This is inherently impossible.

PHP runs on the server; the browser is never aware of it.

Sign up to request clarification or add additional context in comments.

Comments

1

Nope, PHP runs on the server and generates a html code as shown in your browser. Do you want it to show?

1 Comment

What I want is to be able to use preg_match_all on it to get a collection of the content. It's a javascript that displays links, when you mouse over the image with the links you get the actual URL, but if you view the source, you just get <script src=.. etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.