Is Curl in PanX?

Tried to use the curl statement in a simple procedure. Error message and help both indicate it is not supported in PanX. Is there a better way to access/load web pages?


Check out the help pages for loadurl, loadurl(, urltask( and url(. All will get a web page and are synchronous except urltask( which is asynchronous - it will load in the background and allow other work to continue).

Absolutely, Gary is spot on. The url( and urltask( functions are now the primary functions for accessing web content. These use Apple’s excellent built-in code for accessing internet content – in other words, the same code that is used by Safari, Mail, ITunes, etc. These functions are very full featured with a lot more options than the loadurl( and posturl( functions available in Panorama 6 (these functions are still available for compatibility, and internally they rely on the same code used by the url( function.

The curl statement was never intended as a primary way to access web content, but only for specialized applications. A bit of history – curl is actually a shell command, not part of Panorama. (It is also separate from the operating system, and uses different networking code than used by the OS. I recently listened to a very interesting podcast about the history of curl, which it turns out has been written and maintained by one person for over 17 years –

You can always access curl with the shellscript statement or function, and that continues to be possible with Panorama X. The curl statement just made that a little bit easier. However, I would recommend avoiding curl unless you need one of it’s special features, for example, curl supports a large number of internet protocols, not just http:. So if you need to access some old gopher content, by all means fire up curl. But if you are just accessing web (http:) content, I would recommend sticking to url( and urltask(.

Thanks, guys… I’ve been out of the loop for awhile, and am starting to crawl back in. :wink:

I’d seen references to curl, so I assumed it was still kosher. Url( & urltask( will suit me just fine. I continue to be very excited by the promise of PanX, and encouraged by the progress made to date. I really think the only problem is the adjustment I need to make to my “big picture” of PanX programming. And, to get a good look at that big picture, I need to fill in a lot of little blanks. :wink:

Looking forward to filling in… thankful for the help and patience of this forum!


One thing I didn’t mention, in Panorama 6 the primary methods for accessing web content were the loadurl( and posturl( functions. These still work fine, so Panorama 6 applications that use them will continue to work. The new url( function is more flexible and has more features than these older functions, but there’s no downside to using the older functions (they all use the same code under the hood). The new urltask( function provides the exciting new option to access web content in the background.