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 802123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:33:06+00:00 2026-05-14T23:33:06+00:00

I’m starting with PHP for dynamic web pages. I have some libraries written in

  • 0

I’m starting with PHP for dynamic web pages. I have some libraries written in ANSI C for getting/setting parameters and other proprietary stuff. I wonder, is there a simple solution to use a wrapper inside PHP to call this functions? Is there a already existing class/library? What would be the best practice to do this on my own? I don’t want do make calls to external applications and use stdin/stdout!

Is there a simple example available? I don’t want to dig through the Zend documentation for now, I only need a feeling for the complexity.

  • 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-05-14T23:33:07+00:00Added an answer on May 14, 2026 at 11:33 pm

    Can you package your libraries into a DLL? If so, you can call them through PHP’s COM api.

    PHP COM Docs:
    https://www.php.net/manual/en/book.com.php

    Example Code:

    <?php  
    $com = new COM("DynamicWrapper");
    $com->Register("KERNEL32", "Beep", "i=ll", "f=s", "r=l");
    $com->Beep(800, 10);
    

    Otherwise you can write a extension that contains a custom wrapper function (ie, execute_through_wrapper(‘yourfunc’)). Here is a doc on writing php functions in C.

    http://php.net/manual/en/internals2.funcs.php

    Edit:
    http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/

    Here is a quick tutorial on writing extensions in C. It shouldn’t be too difficult to write a wrapper function. Once you created the extension, it can be loaded dynamically through dl() (very dangerous, and depreciated).

    https://www.php.net/manual/en/function.dl.php

    Those are the only options in your case. There isn’t a linux equivalent (.so loader) of the dll loader (its a win32-related api call).

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

Sidebar

Ask A Question

Stats

  • Questions 394k
  • Answers 394k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is the greatest-n-per-group problem that has come up dozens… May 15, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer To get the main window of a process, use the… May 15, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer Your ajax request should look something like this: $.ajax({ url:… May 15, 2026 at 2:13 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.