SA-MP Forums Archive
HTTP retrieves whole .php code - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HTTP retrieves whole .php code (/showthread.php?tid=262383)



HTTP retrieves whole .php code - lolumadd_ - 17.06.2011

On my HTTP request, the data that is sent back is my source. In the source, it uses PHP to echo out some text that is produced by javascript.

The data that is given to me is:
Код:
<html>
<head>
<script type="text/javascript"
etc..

But I want only the text that is echo'd from PHP to display. (Like it does when I go to the page manually). How can I do that?

Thanks.


Re: HTTP retrieves whole .php code - Calgon - 17.06.2011

You can't use javascript with the HTTP requests, the HTTP function does not parse HTML or Javascript, it parses requests to websites to obtain the source code, but not to parse the source code.

There's nothing you can do other than re-code the page to only echo what you need from PHP.