I need to post values to a server. The server will respond with a webpage. I do not want to read the response and echo to a page. I only want to post and let the server display by itself. "header(location:bla bla)"
is a "get" I can't used it. With Curl
or pear
, I will need to explode the response and display it (is a no,no). Any other suggestions?
Asked
Active
Viewed 34 times
0

Theodore R. Smith
- 21,848
- 12
- 65
- 91

user1819551
- 21
- 2
- 7
2 Answers
1
what about automatically submitting a form (method="POST") with javascript?

low_rents
- 4,481
- 3
- 27
- 55
-
I'm posting secure values. Can't be display to browser. – user1819551 May 22 '15 at 12:31
-
then you might want to take a look at this question and answer: http://stackoverflow.com/questions/653090/how-do-you-post-to-a-page-using-the-php-header-function – low_rents May 22 '15 at 12:35
-
Yeah I read that one before. Is not help they adv to used curl or to captured and echo. :( – user1819551 May 22 '15 at 13:02
1
Your question is hard for me to parse, although I tried my best and I also edited it for others.
I think what you may be looking for is the following. For example, if you wanted to display a plaintext file directly in the browser:
// Do processing above...
header('Content-Type: text/plain');
echo $text;
exit;
This will have your browser output the data as if it were a text document, not an HTML page.
But, say you want to do something more exotic? Like output a PNG image?
header('Content-Type: image/png');
echo $pngData;
exit;
I hope that helps. Search online for MIME Types
to find more of these values for other file types.

Theodore R. Smith
- 21,848
- 12
- 65
- 91
-
You aren't even close of what i need to accomplish here. But hey thx anyway. – user1819551 May 22 '15 at 12:59
-
Well, blame yourself, buddy. Your question is incredibly hard to parse. – Theodore R. Smith May 23 '15 at 23:39