Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Using php to create a post from an external application?
Hi,
Maybe a strange question, but I would appreciate it very much if someone around here could show me the basics of how to get TxP to create a new post (article) via an external php application.
Many thanks in advance.
Best regards,
Marcel
Offline
Re: Using php to create a post from an external application?
Just insert a new row in the textpattern MySQL table with all the fields filled out correctly.
Offline
Re: Using php to create a post from an external application?
Hi Ruud,
Is that all it will take to publish a new article? I thought that I needed to get deep into that XML-RPC stuff….
Thanks.
Best regards,
Marcel
Offline
Re: Using php to create a post from an external application?
Hi Ruud,
I looked in the Textpattern table and I guess the only issue is that field UID (?) which seems encripted somehow? Would you know how to generate that?
Thanks in advance.
Offline
Re: Using php to create a post from an external application?
UID is a random md5 checksum. As long as it’s unique, it’s okay.
Offline
Re: Using php to create a post from an external application?
Hi Ruud,
Thanks for pointing that out.
I am very open to a braindump on the php code to create such a md5 string by the way :-)
Offline
Re: Using php to create a post from an external application?
TXP itself uses: $uid = md5(uniqid(rand(),true));
Offline
Re: Using php to create a post from an external application?
Ruud,
Very much appreciated!!!
Thanks.
Offline
#9 2007-12-13 23:19:41
- reast
- New Member
- Registered: 2007-12-11
- Posts: 4
Re: Using php to create a post from an external application?
How is ‘Body_html’ generated? Looks like it’s created client side?
Offline
Re: Using php to create a post from an external application?
body_html is derived from body. In some cases they are the same, but body can also have textile markup which is converted to HTML for body_html.
Offline