0
我通过我的PHP页面复制了发布信息。 唯一的问题是我如何将音频链接添加到发布请求? 我想以后通过JS如何添加图片文件或base64地址到http post请求?
请求标发帖子:
POST http://127.0.0.1:80/in.php
Host: 127.0.0.1:80
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------134852597824187
Content-Length: 8442
Connection: keep-alive
Upgrade-Insecure-Requests: 1
请求正文:
-----------------------------134852597824187
Content-Disposition: form-data; name="file"; filename="image2.png"
Content-Type: image/png
'Here I see a long address to the picture, but it's a tricky address, would it be possible to add base64?
‰PNG
pœËÖ¶ÁÁñDB°ýØêê2ŽsÒi¦è†‘...
-----------------------------134852597824187
Content-Disposition: form-data; name="method"
post
-----------------------------134852597824187
Content-Disposition: form-data; name="imacros"
true
-----------------------------134852597824187--
PHP代码:
<form id="host" method=post action="http://127.0.0.1:80/in.php" enctype="multipart/form-data">
<input type="file" id="file" name="file">
<input type="hidden" name="method" value="post">
<input type="hidden" name="imacros" value="true">
<input type="submit" value="Submit">
</form>
这里有个问题,但我不太明白。 PHP和/或JavaScript代码在哪里? – tadman
@tadman我更新了帖子 – nas