Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:58:25+00:00 2026-06-14T10:58:25+00:00

GREAT comment thread at: https://stackoverflow.com/a/6398220/1679026 gave me hope but I failed to solve my

  • 0

GREAT comment thread at: https://stackoverflow.com/a/6398220/1679026 gave me hope but I failed to solve my issue. When I use cURL to fetch the http://www.php.net page, it works so cURL works

I have a network-appliance that lives on a local LAN (http://192.168.1.117) here, or at my client site the devices (n) are on their LAN (173.18.13.xxx). From a Local_Browser_Address I can type “http://192.168.1.117/#diag/term&cmd=signage+sign+ALARM” and the network-appliance responds with a change to the “ALARM” state. <– That is what I want to automate with one button!

On my web form I have $_POST PHP code to execute when the Alarm_Button is clicked. I want the user on my clients physical site to be able to click the_button on my web_form (www.mySite.com/index.php?option=com_rsform&formId=27) in -their browser- and have cURL code send/Post/execute that (http-ALARM) address/instruction string. Can I do this thing? No UI Required at or after address/instruction is sent.

I tried:

     $c = curl_init('http://192.168.1.117/u/r/l');
     curl_setopt($c, CURLOPT_HTTPHEADER, array('#diag/term&cmd=signage+sign+ALARM'));
     curl_exec($c);

AND

     $curl = curl_init();
     echo"<br>  the curl resource is ch --> $curl";
     curl_setopt ($curl, CURLOPT_URL, "http://192.168.1.117");
     curl_setopt ($curl, CURLOPT_POST, "/#diag/term&cmd=signage+sign+CELL_IN_ALARM");
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
     $result = curl_exec ($curl);
     curl_close ($curl);
     echo"<br>  The RESULT (1) is --> $result";

No error message but no useful result.

First: I am afraid I am being stopped by the security restrictions like “no_outside_web_page_doing_junk_locally” kind of rules.

IF I have to create a local page on an internal web server, I can do this on another device on the same/adjacent network. But the problem remains for me, how to express the ip/command instruction in the cURL tools.

I have scoured the StackOverFlow information and it seems like I am close but missing the “glaring truth” somewhere!

Hope my challenge is worthy of your interest.
Thank you.
—UPDATE—

HTTPFox capture of the POST events
the “Sent” values (461) above and below the one (484) highlighted have respective POST Data of:
{“version”:”1.1″,”method”:”unit.baseInfo”,”id”:28,”params”:[]}
{“version”:”1.1″,”method”:”term.cmd”,”id”:29,”params”:[“signage sign CELL_IN_ALARM”]}
{“version”:”1.1″,”method”:”unit.baseInfo”,”id”:30,”params”:[]}

This shows Types application/jason and URLs of –http://192.168.1.117/jasonrpc-(jasonRemoteProcedureCall?)

Does this simplify or complicate my struggle?

— New Update —

When I run the following code I get the php.net home page and a blank return “…is –>” for the second return…

// From http://www.tuxradar.com/practicalphp/15/10/2
  $curl1 = curl_init();
    curl_setopt ($curl1, CURLOPT_URL, "http://www.php.net");
    curl_setopt($curl1, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec ($curl1);
    curl_close ($curl1);
    print $result;
//====================
  $curl = curl_init();
    curl_setopt ($curl, CURLOPT_URL, "http://192.168.1.117");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec ($curl);
    curl_close ($curl);
    //print $result;
  echo"<br>  The RESULT (1) is --> $result";

The first one is a www and the second one is the device on my network. Is this a primitive Network/Web conflict? Really appreciate the brain cycles here!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:58:27+00:00Added an answer on June 14, 2026 at 10:58 am

    You are thinking of CURLOPT_POSTFIELDS.

    This can be used like

    $ch = curl_init($site);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "field1=value1&field2=value2&field3=value3");
    $chx = curl_exec($ch);
    

    It should also be noted that CURLOPT_POST only takes TRUE or FALSE per the documentation found here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: Based on rrenaud's great comment I wanted to clarify that although I'm generating
Great toolkit and great demos! I want to use XTK with an existing system.
Oh great Stackoverflow, I beseech thee... I need to do the following: CREATE UNIQUE
I followed this great tutorial toajax my blog: http://www.deluxeblogtips.com/2010/05/how-to-ajaxify-wordpress-theme.html But it creates some problems
i am using this example to create a comment system. So far works great.
Here are the few shortcuts to comment code, which works great on Windows. Ctrl-/
Basically this example works great on chrome and firefox but the marked table (marked
We all know that Mathematica is great, but it also often lacks critical functionality.
This article describes a great pattern called 'Domain Events': http://www.udidahan.com/2009/06/14/domain-events-salvation/ One major flaw with
Below is my original question and code but per CoreyRS's comment let me add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.