将大量信息放入SQL数据库的更好方法,而不是在URL中查询


A better way of putting allot of information into an SQL database, than querying in URL

我设置了一个简单的php脚本,通过该脚本,我通过以下URL查询将信息放入MySQL数据库:

https://www.thesite.com/addinformation.php?WHERE_TO_LABEL_IT_AS& WHAT_TEXT_TO_ADD "

我通过使用wget

从bash调用它
wget --no-check-certificate --user=username --password='password' --delete-after https://www.thesite.com/addinformation.php?$LABELVARIABLE&$STRINGVARIABLE"

它可以满足我的需要,但我现在想使用类似的方式将大块文本添加到数据库中。甚至可能是整个文本文件。你会推荐我用什么方法来做这件事?

您可以将内容保存到文件中,然后使用wgetcurl发布。

$ wget --post-file=<file path>

$ curl --data-binary @<file path>