Raised This Month: $ Target: $400
 0% 

Sockets -> PHP script problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 10-19-2009 , 18:06   Re: Sockets -> PHP script problem
Reply With Quote #1

I use sockets to match steamid's with my website.

I use GET like you showed
PHP Code:
GET /%s?name=%s&steamid=%s&ip=%s HTTP/1.1^nHost: %s^n^
And I get no 404
__________________
VMAN is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-19-2009 , 19:59   Re: Sockets -> PHP script problem
Reply With Quote #2

Actually, there was a problem with my socket query.
I believe I was putting the host formatted into the wrong section.
So instead of:
Host: exolent.zinkhosting.net^n^n
It was
Host: IP.GOES.HERE.XD^n^n

Anyway, everything works now.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-20-2009 , 16:55   Re: Sockets -> PHP script problem
Reply With Quote #3

Just wondering: does _POST work for data sent by URL, as you've done? I suspect that, if it does, it would be unreliable elsewhere since a browser would handle all of the post/form data internally.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2009 , 17:52   Re: Sockets -> PHP script problem
Reply With Quote #4

I don't know. I didn't test after I fixed my method with GET.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-20-2009 , 19:27   Re: Sockets -> PHP script problem
Reply With Quote #5

Quote:
Originally Posted by Hawk552 View Post
Just wondering: does _POST work for data sent by URL, as you've done? I suspect that, if it does, it would be unreliable elsewhere since a browser would handle all of the post/form data internally.
This is the correct format for POST

Code:
POST /plugin_upload.php HTTP/1.0\n
User-Agent: HTTPTool/1.0\n
Content-Type: application/x-www-form-urlencoded\n
Content-Length: 512\n
\n
name=SomeName&authid=SomeId&reason=SomeText
You must be sure to put the correct Content-Length to avoid compatbility problems with web servers.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
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 17:40.


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