What's new? | Help | Directory | Sign in
Google
osap
OpenMovilforum SMS API in PHP
  
  
  
  
    
Search
for
Updated Apr 12, 2008 by merlos
Labels: install, osap, pear, php
InstallOsap  
How to Install OSAP

What do I need to run OSAP

There are two non-technical mayor issues:

  1. To send SMS you need to be a Telefonica EspaƱa client, that is have a SIM card with an assigned number.
  2. To receive SMS you need to follow the Instructions of Movilforum (in Spanish).

And technical requirements:

  1. PHP
  2. Some knowledge of PEAR Extensions

Install Steps

OSAP is distributed in two kinds of packages:

  1. With PEAR Extensions. OSAP uses some classes of the PEAR Extensions, this package just includes all PEAR classes that requires.
  2. Without PEAR Extensions. You might already have a PEAR installation in your application. Then you might want to just copy OSAP files.

1 with PEAR Extensions

If you download this package, just decompress the rar file and you have 3 examples ready to run.

2 without PEAR Extensions

If you already have PEAR installed on your system you may prefer not to have PEAR packages duplicated.

So the steps to follow are:

2.1 Install Required PEAR packages

Required PEAR packages you need to install in order to use OSAP are:

  1. Net_SMS
  2. POP3
  3. HTTP_Request

Note: If you plan to use a POP3 account with an SSL connection you need to have enabled openssl PHP Extension, as well.

2.2 Copy movistar_sms_http.php

Copy the OSAP movistar_spain_http.php file in the Net/SMS directory of your PEAR installation. That is, your pear packages are installed anywhere in your hard drive, find where. In that folder there must be a Net folder with an SMS subfolder. Just copy that file there.

2.3 PEAR Path

In order to run OSAP, you must include the directory of your pear installation in your PHP path. To do this just include this line in your code:

$_CONFIG['pearDir']='pear/';
$delim = (PHP_OS == "WIN32" || PHP_OS == "WINNT") ? ';': ':';
ini_set('include_path', ".{$delim}{$_CONFIG[pearDir]}{$delim}");
unset ($delim);

or edit your php.ini file. For example:

include_path = ".;C:\php\pear"

Sign in to add a comment