Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

how can post to other script and get returned data

  • saman2
  • saman2
  • ONLINE
  • Posts: 407
  • Thanks: 7
  • Karma: -1
6 years 6 months ago - 6 years 6 months ago #304708 by saman2
hi
A ) how can i post the data to some url and get returned data from that?for example i have phone number i cb and i want every time i call that AutoAction from, then i want
1-post that phone number to other url.
2-then that url return to me one token according user phone that i send in level 1.
the data will returned to me exactly like this:
Code:
{ "code": 200, "data": { "token": "0b2d53b8-6401-585e-bf73-510fdc97109d" } }
and i want get only token value from that

3-i want saved that returned token to some CB field of that user.
B )
other important question:how can i use url to fire the autoaction and post some parameter such as user id to that autoaction and how get user id via autoaction? is work [post] subsitiution or $_POST php global?
if is it possible reply me A ) section it is little emergency...thank you kyle..
Last edit: 6 years 6 months ago by saman2.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 6 months ago #304714 by krileon
Use a Code action with Method set to PHP and code the entire interaction your self. There is no action type to handle what you're trying to do. As for executing an auto action from URL simple don't specify any Triggers, save the action, and under the Global tab is the URL to execute it manually. To specify a user for direct execution simply supply a user id to the "users" URL parameter. Other parameters in the URL can be accessed with [get_URL_PARAM_NAME]. Example URL as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&users=USER_ID_HERE&test=123

In the above using [get_test] will substitute in 123.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • saman2
  • saman2
  • ONLINE
  • Posts: 407
  • Thanks: 7
  • Karma: -1
6 years 6 months ago - 6 years 6 months ago #304717 by saman2

krileon wrote: There is no action type to handle what you're trying to do.

What is your mean about this? Is your mean my scenario can not implement? Can i get returned code from other site?
simply i want to know is it possible to request from my joomla to other site and get returned reply?
Last edit: 6 years 6 months ago by saman2.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 6 months ago #304725 by krileon
You can send an HTTP request using the Request action type, but it can't do anything with the return data beyond display it. There is no code to handle storing the response. You maybe able to force some sort of storage behavior in the Output parameters by using PHP output and adding storage code there. But no there is no action type specifically designed for exactly what you're wanting; you're going to have to code some or all of it.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum