You wrote "So   causes a problem for a cURL message. The message
is truncated at the ampersand."

This could be due to the fact that on UNIX-like systems (including
Mac), the command line interprets the ampersand as "everything before
this point should be run in the background." Anything after the
ampersand is another command.

If this is the problem, here is the solution: put the entire string in

  curl "http://...&...&...";


On Nov 11, 4:06 pm, mndasher <> wrote:
> I store my content in a MySQL database. The website is using PHP. Data
> fields are encoded so that html tags are using entities; i.e.  <p> =
> &lt;p&gt;  When I query the database I decode the entities, and then
> strip the tags. That works fine. But some entities don't get
> converted. So &nbsp; causes a problem for a cURL message. The message
> is truncated at the ampersand.  So I did a string replace where &nbsp;
> becomes a space.  So that solved one problem. But ampersand is still a
> problem. Neither &amp; or simply & work. The both result in a
> truncated message.  A string replace of &amp; with 'and' seems to
> work. But is kind of weird.
> I have also tried utf8_encode($message) but I don't see any difference
> in the output or the result with the API.
> All of the API help and samples I have seen use a very simple message
> example. I have not seen any help on how to format the actual
> message.  I saw some where that it should be UTF-8. Mostly the
> messages are plain text, but these two characters cause problems. So
> do quotes and single quotes as far as that goes.  If I add slashes the
> slashes come through in the final message.
> Is there any real help for these problems?

Reply via email to