MyBB Community Forums

Full Version: Create thread from external php file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to create a new thread from an external php file that's not even on the same server in a specific forum section?

via post parameters or something?
(2014-03-21, 04:28 PM)hitmanex Wrote: [ -> ]Is it possible to create a new thread from an external php file that's not even on the same server in a specific forum section?

via post parameters or something?

does the server mybb is installed on allow remote connections ?
if no
you will need to build a 'listener' on the mybb server to process requests from the remote server and perhaps return a value to the remote server on success. An example of this can be found in the Paypal IPN project .. look here for a php example. from this as an example you may be able to code your own web service
I have full control over the server.

There's no simple way to do this with some POST variables?

i'm familiar with paypals ipn but doing that from scratch is a bit complex
(2014-03-21, 10:05 PM)hitmanex Wrote: [ -> ]I have full control over the server.

There's no simple way to do this with some POST variables?

i'm familiar with paypals ipn but doing that from scratch is a bit complex

Ok you are going to use post variables
so how will newthread.php handle the post variables
like can you create valid posthash, postcode & tid variables ?

I guess you need to code a web service.

However if the server allows remote connections you could add posts via sql commands but you would have to validate quite a few fields to make the post/thread to show correctly in your mybb site
NEVER expose your MySQL directly to the outside world. You do not want random hackers trying common usernames and passwords to pwn your system or listen to traffic between your web server and db server.

Your posting mechanism needs to authenticate and verify identity before creating a thread. It also needs to know which member should be credited with creating the thread.
(2014-03-21, 10:30 PM)laie_techie Wrote: [ -> ]NEVER expose your MySQL directly to the outside world. You do not want random hackers trying common usernames and passwords to pwn your system or listen to traffic between your web server and db server.

Your posting mechanism needs to authenticate and verify identity before creating a thread. It also needs to know which member should be credited with creating the thread.

is that not what I said ?