Informacje z branży IT:

Logitech zmniejsza prognozy i planuje redukcje
Kierownictwo koncernu obniżyło wcześniejsze prognozy wzrostu sprzedaży. Szwajcarska firma dołączyła również do grona firm planujących restrukturyzację. W ramach zapowiedzianych redukcji pracę straci ok. 500 osób.
Tue, 6 Jan 2009 18:20:08 +0100

Lepsze raporty i analizy w sieci dystrybucyjnej
Firma TIM S.A. wdraża oprogramowanie MicroStrategy Business Intelligence w celu udoskonalenia możliwości raportowania i analizowania danych.
Tue, 6 Jan 2009 15:26:51 +0100

Autodesk kończy współpracę z firmą Foundry
Z początkiem stycznia br. brytyjska firma Foundry straciła status członka programu Autodesk Authorised Developer Network. Współpraca obu firm trwała 12 lat. Równocześnie zmniejszone zostały opłaty licencyjne za korzystanie z rozszerzeń Furnace, Tinder i Keylight.
Tue, 6 Jan 2009 14:27:14 +0100

Porozmawiamy jakie są trendy w świecie wirusów komputerowych. Powiemy też jak skutecznie chronić nasz komputer przed spywarem i wirusami komputerowymi oraz innymi zagrożeniami z sieci. Naszymi gośćmi będą Olga Komuda, Adam Żelazko i Piotr Walas szef działu technicznego Panda Security.

Kurs programowania:

Using Extensions

Using Extensions

Depending on the build process you selected, you should either end up with a new PHP binary to be linked into your Web server (or run as CGI), or with an .so (shared object) file. If you compiled the example file first_module.c as a shared object, your result file should be first_module.so. To use it, you first have to copy it to a place from which it's accessible to PHP. For a simple test procedure, you can copy it to your htdocs directory and try it with the source in Przykład 46-3. If you compiled it into the PHP binary, omit the call to dl(), as the module's functionality is instantly available to your scripts.

Ostrzeżenie

For security reasons, you should not put your dynamic modules into publicly accessible directories. Even though it can be done and it simplifies testing, you should put them into a separate directory in production environments.

Przykład 46-3. A test file for first_module.so.

<?php
    
// remove next comment if necessary
// dl("first_module.so");

$param = 2;
$return = first_module($param);

print(
"We sent '$param' and got '$return'");

?>

Calling this PHP file should output the following: We sent '2' and got '2'

If required, the dynamic loadable module is loaded by calling the dl() function. This function looks for the specified shared object, loads it, and makes its functions available to PHP. The module exports the function first_module(), which accepts a single parameter, converts it to an integer, and returns the result of the conversion.

If you've gotten this far, congratulations! You just built your first extension to PHP.


Kaspersky Lab, producent rozwiązań do ochrony danych, opublikował nowy artykuł analityczny pt. "Identyfikowanie botnetów rozsyłających spam z wykorzystaniem metody skoordynowanych dystrybucji".