Log in to forum and make a post to topic x

Everything else that doesn't fall into one of the other PB categories.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Log in to forum and make a post to topic x

Post by StarWarsFan »

I am thinking how this would be possible, let me sort my thoughts for this request.

Let a PureBasic program...
- login to forum (My own forum runs on SMF, example: www.simplemachines.org/community/index.php)
with login and password
- Make a post to a specified thread (i.e. let the program execute .../index.php?action=post;topic=x)
where x is a simple integer indicating the topic number
a subject must be filled in and a body message too


Is that doable in PB? Has anybody done that yet?

// Moved to "General Discussion" (Kiffi)
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Log in to forum and make a post to topic x

Post by Kwai chang caine »

Hello StarWarsFan
Obviously it is possible, there are also several examples of connection on the site of PB and filling of fields in JS or other methods :wink:
In a nutshell, you want to create in PB, exactly what FRED and his moderators fight every day to keep us a clean forum. :mrgreen:
ImageThe happiness is a road...
Not a destination
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: Log in to forum and make a post to topic x

Post by StarWarsFan »

I am sorry. That has not been my intention. Instead I said I want to run that on my *OWN* forum.

On the other hand such a response is useless and worthless because it leaves me with absolulely nothing in my hands. Can you not at least give me a link where I could continue my search if it is all so easy and already there as you claim?

And several examples? Are you serious? I have found NONE that work. ZERO! All I found in the last hours of searching: broken links from 2003, code that does not work, pseudo-intellectual lecturing, arrogant comments or recommendations about books to read, maybe this, try that, or perhaps the other, but not one piece of code that actually does what it should or what I could use as basis to evolve my code upon.

And before the typic arro-gant-ass-hole-attitude-response comes like "Do you expect us to do everything for you" - NO, FFS, NO! I have never said that, neither have I ever demanded that. But just *something* that works, some bit more than this nothingness would really do!


You know what? Scratch the request.

@ADMIN: remove this thread.
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Log in to forum and make a post to topic x

Post by Rinzwind »

Stop drinking, it makes you agressive.
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Log in to forum and make a post to topic x

Post by infratec »

Serious :?:

You want a 100% exact answer to your first post ?

Yes and yes.

Because you asked:
Is that doable in PB? Has anybody done that yet?
And your answer to KCC is below the belt.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Log in to forum and make a post to topic x

Post by luis »

Probably this is not what you want
viewtopic.php?f=13&t=45907
and the code does not work because the page has changed, but you can get some ideas or laugh at it and move on.

The problem on doing this by yourself in code, posting through a connection is you have to support HTTPS, and I don't remember seeing code doing that in the forum, but maybe I've missed it.

Yep, KCC comment was ridiculously defensive but yours was exceedingly aggressive don't you think ?

edit: I found this -> http://forums.purebasic.com/english/vie ... hp?t=69628

Have you tried searching for libcurl ?
"Have you tried turning it off and on again ?"
A little PureBasic review
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Log in to forum and make a post to topic x

Post by infratec »

To give you an idea:

viewtopic.php?p=512799#p512799

Most of them is now doable with HTTPRequest()
Last edited by infratec on Tue Oct 26, 2021 6:54 am, edited 1 time in total.
Bitblazer
Enthusiast
Enthusiast
Posts: 730
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Log in to forum and make a post to topic x

Post by Bitblazer »

You can just trace what a browser does by using a proxy or Wireshark and then imitate that with httprequest. That is a shortcut to reading a few RFC's.
webpage - discord chat links -> purebasic GPT4All
User avatar
NicTheQuick
Addict
Addict
Posts: 1218
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Log in to forum and make a post to topic x

Post by NicTheQuick »

Bitblazer wrote: Mon Oct 25, 2021 11:19 pm You can just trace what a browser does by using a proxy or Wireshark and then imitate that with httprequest. That is a shortcut to reading a few RFC's.
Or you just open the developer console of your browser and record everything that happens between you and the server. Proxies and Wireshark won't help you with encrypted data.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
NicTheQuick
Addict
Addict
Posts: 1218
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Log in to forum and make a post to topic x

Post by NicTheQuick »

@StarWarsFan: Do you know if your forum has an API?
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
BarryG
Addict
Addict
Posts: 3266
Joined: Thu Apr 18, 2019 8:17 am

Re: Log in to forum and make a post to topic x

Post by BarryG »

User avatar
idle
Always Here
Always Here
Posts: 5018
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Log in to forum and make a post to topic x

Post by idle »

@StarWarsFan: You can edit your own post, there is no need to delete the whole thread and you might want some more help with the implementation.

From what I see you have received many good answers.
Everyone can have a bad day but it doesn't pay to take out your frustration on the forum or bite the hands that feeds you. And it's best not to misinterpret what others say here as English is often a second language here.
Post Reply