vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Automated Posting? (https://vborg.vbsupport.ru/showthread.php?t=43970)

Flare 09-26-2002 07:12 PM

Automated Posting?
 
Hi folks,

I hope this is the right forum for this, but here's what I want to do and I'm not exactly sure how to go about it.

I have a private forum that I use for various informational items for my users. All the information I need posted, I store in a MySQL database that I collect from forms that are filled out.

Now, I have this info in the database, but I would like to automatically post it to my vB forums. The databases are on two seperate machines, so injecting the data into the vB database manually would be problematical from a security standpoint (this was the first option I looked at).

What I would like to do is use something like wget (wput?) or even write a custom PHP app that will post a formatted message under my user account to my forums on a sheduled basis (IE - I would setup a cron job).

I can do a lot of things in PHP, but posting to a private forum that requires authentication is a mystery to me. My problem mainly is, I don't even know where to begin with doing something like this, and I was hoping ya'll could shed some light on that.

Thanks,

Flare

Xenon 09-26-2002 08:09 PM

you have to build a script around this query:
Code:

INSERT INTO post (postid,userid,threadid,dateline,visible,pagetext) VALUES (null, your userid, threadid to post in, actual time, 1, and here is all infos you want to have in the post)
not thet will add a post to a thread you specified in whatever forum this thread is in, but it won't upgrade any counters
you should also run this query to get the right ammount of replys in the thread:
Code:

UPDATE thread SET replycount=replycount+1,lastpost=actualtime

Flare 09-26-2002 08:16 PM

Quote:

Now, I have this info in the database, but I would like to automatically post it to my vB forums. The databases are on two seperate machines, so injecting the data into the vB database manually would be problematical from a security standpoint (this was the first option I looked at).
I can easily inject the data into the database, were the two databases on the same machine, or even if I had "remote" access from one database to the other. But for security reasons, no outside access is allowed to either database, other than from localhost.

I'm looking for a way to essentially simulate a user posting a message into a vB forum.

Xenon 09-27-2002 10:32 AM

sorry, i missunderstood...

then i've no idea, i didn't work between two servers ;)
sorry

Logician 09-28-2002 09:18 PM

The easiest way would be to find an host that allows remote connections to MYSQL. You would be most comfortable with this solution. But if this is not an option for you, you have to write a script that submits info in "POST METHOD". Just make sure to add 2 more fields to your default vb new thread form and add username and password there. Of course username you provided should be allowed to access this forum. This should solve the problem if you are trying to create threads by a single poster id.

But if you are trying to move threads of different users with their own username, well this would be still possible but harder to explain how :) (Summary: A new (an alternative newthread.php) script should be written to accept the sender scripts requests)


All times are GMT. The time now is 10:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01066 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete