Page 1 of 1

How to send POST data?

Posted: Thu Aug 07, 2003 12:50 pm
by Bongulim
I'm sorry if it's answerd somewhere I couldn't find, but please help me: I want to read a page that requires me to in before I can read it. how can I send the POST data thorgh a script (that is so I won't have to click a button on a form)
Thanks inadvance
Bongulim

Posted: Thu Aug 07, 2003 1:03 pm
by xisle

Code: Select all

print"<script language="JavaScript">\n";
print"<!-- hide me \n";
print"window.document.yourformname.submit();\n";
print"// show me -->\n";
print"</script>";

Posted: Thu Aug 07, 2003 3:18 pm
by hedge
do a search on my username.. I've answered this question many times and I am too lazy to search myself at the moment.

Posted: Thu Aug 07, 2003 6:23 pm
by Bongulim
thanks hedge - I've find viewtopic.php?t=7063 helpful. quite solved it actually :D

Posted: Thu Aug 07, 2003 9:12 pm
by hedge
Bongulim wrote:thanks hedge - I've find viewtopic.php?t=7063 helpful. quite solved it actually :D
BTW the function 'httpParseResponse' in my code is incorrect. It explodes by \r\n\r\n when it should just split the headers from the content at the first occurrance of \r\n\r\n

Posted: Thu Aug 07, 2003 10:45 pm
by dataangel

Code: Select all

<form method="post" action="<?php echo $PHP_SELF ?>">
<input type="hidden" name="hiddenpostdata" value="hiddenpoststuff">
</form>