Jump to content

Get forum data from remote site

Featured Replies

Posted

I'm looking to fetch data from the forums (using SQL commands) and use the data on a separate site (that isn't related to IP.Board). An example of such data is latest topics in a specific forum, or the topics with the most reputation.

 

What would be the best way to achieve this? Basically I want to create a new page that contains the result of the SQL command, and fetch that page using Ajax (with Access-Control-Allow-Origin).

More precisely, you want to sync to seperate forums.

May I ask why? Google HATES duplicate content and one or the other website will be punished for it.

 

Unless you mean for statistical purposes, you could just create a php file that pulls data from the database and outputs it as JSON, from there your server can grab it, and work with the data using json_decode(file_get_contents("http://ipb.mysite.com/json/topics.php?output=json"), true);

If so and you're wanting someone to do it for you, send me a PM and we can work something out.

Edited by RADStudios

  • Author
59 minutes ago, RADStudios said:

you could just create a php file that pulls data from the database and outputs it as JSON

This is the part I'm wondering how to accomplish. The site that wants the data is not a forum and has nothing to do with IP.Board.

What's the PHP required to A. Connect to the forum database, B. Perform the query and C. Print the result as Json?

  • Author
9 minutes ago, RADStudios said:

Hey David,

If it's that simple, then I guess my question is where I find the database information (name/username/password)?

Your host / provider. If you're on the IPS Cloud Community, You don't have access to this.

  • Author
3 minutes ago, RADStudios said:

Your host / provider. If you're on the IPS Cloud Community, You don't have access to this.

So I can't access the database I'm paying for? Or do I have to get support?

No they do not allow direct access to the MySQL Database. (I've asked)

  • Author

Thanks. I will look into the self-hosting plans. They seem to be cheaper anyway.

  • Community Expert

If you're on 3.4, you could use external blocks in IP.Content, if you're using IPS4, IPS4.1 will bring back external block functionality.

4 minutes ago, Stuart Silvester said:

If you're on 3.4, you could use external blocks in IP.Content, if you're using IPS4, IPS4.1 will bring back external block functionality.

Hey Stu, would this allow raw json output?

Ah, I assume only if suite wrapper is disabled.

Edited by RADStudios

  • Community Expert
9 minutes ago, RADStudios said:

Hey Stu, would this allow raw json output?

Ah, I assume only if suite wrapper is disabled.

Not greatly, Pages gives you some JavaScript/code that you put on the page, it takes care of the rest.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.