Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2002, 07:12 PM
Flare Flare is offline
 
Join Date: Oct 2001
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-26-2002, 08:09 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 09-26-2002, 08:16 PM
Flare Flare is offline
 
Join Date: Oct 2001
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-27-2002, 10:32 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, i missunderstood...

then i've no idea, i didn't work between two servers
sorry
Reply With Quote
  #5  
Old 09-28-2002, 09:18 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:40 PM.


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.04422 seconds
  • Memory Usage 2,198KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete