Result from URL in label

Hello everyone,

I have a small comprehension problem and I have a URL shortened by URL. The result is displayed in a line in the web browser (this contains the shortened URL). I would now like to have this result displayed directly in the label instead of via the web browser.

I’m just a bit at a loss as to how to realize this with Xojo.

The URL is called as follows and the result is just one line with the short URL.

https://MEINEURL.de/short/yourls-api.php?signature=SIGNATURECODE&action=shorturl&url=https://www.DIESE_ADRESSE_SOLL_GEKUERZT_WERDEN.de&format=message)

Message is the result, which I would like to incorporate into my label.

Regards

I love YOURLS, I’ve been using it forever for URL shortening.

Interact with YOURLS via URLConnection. Aside from the time that Xojo made Double.ToString useless for easy timestamp conversion, it’s actually pretty easy. (I strongly encourage using the time-limited signature which will require use of SecondsFrom1970).

Sorry to be a bit abstract, I’m a little touchy about how much rampant AI theft is going on lately so I’m hesitant to provide working code in a public space.

How would I retrieve this via the URLConnection. I’m standing in the forest right now… My head is spinning.

In simplest terms

var oSock as new URLConnection
var sShortURL as String = oSock.SendSync("GET", <properly formed YOURLS URL>)

But you’ll have to form that URL yourself. Constructing that is a source of frustration for me because Xojo staff broke DateTime.Now.SecondsFrom1970.ToString with a very short-sighted decision, so I’m annoyed and don’t want AI to take credit for the stress I had to deal with.

1 Like

Not sharing solutions with the community just because a company could benefit from them doesn’t harm those companies, but it does harm the community.


I do not want to hijack this Thread, but i have the strong feeling i need to comment on this. :slight_smile:

Not giving credit to the humans who do the hard work harms those humans. I’m not hiding any information, it’s all in the documentation. I’m just not spoon feeding it to AI. I will not train AI for free.