Raised This Month: $ Target: $400
 0% 

Posting to a PHP script


Post New Thread Reply   
 
Thread Tools Display Modes
Kilandor
Member
Join Date: Sep 2009
Old 06-26-2010 , 23:08   Re: Posting to a PHP script
Reply With Quote #11

You could use
PHP Code:
header_remove():header('your headers here'); 
This will unset all headers. Then use header() output the header information you want.
__________________
Kilandor is offline
Fishcake
Junior Member
Join Date: Feb 2009
Location: England
Old 06-27-2010 , 06:47   Re: Posting to a PHP script
Reply With Quote #12

Ok cool, I'll have to get my PHP updated on my host, but I'll give that a go.
Fishcake is offline
Send a message via MSN to Fishcake
Fishcake
Junior Member
Join Date: Feb 2009
Location: England
Old 06-27-2010 , 09:09   Re: Posting to a PHP script
Reply With Quote #13

Hmmm, that didn't quite work. It's still sending headers.
Fishcake is offline
Send a message via MSN to Fishcake
Kilandor
Member
Join Date: Sep 2009
Old 06-27-2010 , 11:17   Re: Posting to a PHP script
Reply With Quote #14

Your likely going to have to just clean out the data to what you want/need.
__________________
Kilandor is offline
Fishcake
Junior Member
Join Date: Feb 2009
Location: England
Old 06-28-2010 , 03:51   Re: Posting to a PHP script
Reply With Quote #15

Hmmm, I'm not sure how though. I have tried exploding the return by the new lines but that didn't seem to work.
Fishcake is offline
Send a message via MSN to Fishcake
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 01-09-2021 , 08:21   Re: Posting to a PHP script
Reply With Quote #16

Quote:
Originally Posted by Kilandor View Post
I stripped out everything bare minimum that is needed. In this case you would simply call Command_PostExample to execute the connection.

And you can setup your PHP script to save some data to a file to see what all happens and what not.
Code:
OnSocketConnected: successufully, wait for OnSocketReceive!
=================================================================
requestStr: POST /home HTTP/1.1
Host: ranks.moonsiber.org
Connection: close
Content-type: application/x-www-form-urlencoded;charset=UTF-8
Content-length: 6
Cache-Control: no-cache

sid=49

OnSocketReceive => HTTP/1.1 400 Bad Request
Date: Sat, 09 Jan 2021 13:19:08 GMT
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1h
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>

*** OnSocketDisconnected!
Nothing to understand. Correct data, headers. But server still drops connections.

Last edited by ZASTRELIS; 01-09-2021 at 08:22.
ZASTRELIS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode