Skip to main content
replaced http://meta.stackexchange.com/ with https://meta.stackexchange.com/
Source Link

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcat, I was able to post one commentone comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: httphttps://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcat, I was able to post one comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcat, I was able to post one comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

Fixup of bad MSO links to MSE links migration
Source Link
Fixup of bad MSO links to MSE links migration
Source Link

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcatnetcat, I was able to post one comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcat, I was able to post one comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

I am trying to send a POST request to Meta using my account... but it's just not working very well. Using netcat, I was able to post one comment, but I have had no luck getting it to work with a PHP script.

I used a TCP monitor to capture the packets going back and forth between my browser and the server and managed to figure out some of it.

I am hoping someone on the team can help me here. Here is the POST request I'm sending:

POST /posts/51812/comments HTTP/1.1
Host: meta.stackoverflow.com
User-Agent: Mozilla/5.0
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://meta.stackexchange.com/questions/51812/
Cookie: usr=*********; somusr=*********
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 87

comment=This+comment+was+posted+from+someplace...&fkey=********

As you can see, a normal request. I have a few questions though:

  • What is the fkey parameter for? Where does it come from? What I have been doing thus far is fetching the page I want to post the comment on and using a RegEx to dig up the value.
  • Why does the server return the following and what does it mean?
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /error?aspxerrorpath=/posts/51812/comments
Server: Microsoft-IIS/7.5
Date: Mon, 26 Jul 2010 01:44:07 GMT
Content-Length: 171
...

Any help or pointers would be appreciated.

Migration of MSO links to MSE links
Source Link
Loading
Could be confused with [posts] in the autocomplete
Link
Jon Seigel
  • 40.7k
  • 7
  • 82
  • 160
Loading
grammar
Source Link
Ether
  • 31.4k
  • 5
  • 55
  • 110
Loading
Source Link
uɐɯsO uɐɥʇɐN
  • 21.4k
  • 2
  • 89
  • 125
Loading