php-general Digest 20 Apr 2012 20:00:33 -0000 Issue 7783

Topics (messages 317619 through 317640):

Re: SqLite INSERT want not write
        317619 by: Stuart Dallas
        317620 by: Silvio Siefke
        317621 by: Stuart Dallas
        317624 by: tamouse mailing lists
        317625 by: Silvio Siefke
        317626 by: Steven Staples
        317627 by: Stuart Dallas
        317628 by: Stuart Dallas
        317630 by: Silvio Siefke
        317631 by: Steven Staples
        317632 by: tamouse mailing lists
        317633 by: Silvio Siefke
        317634 by: Stuart Dallas
        317635 by: Steven Staples
        317636 by: Silvio Siefke
        317637 by: Tommy Pham
        317638 by: Silvio Siefke
        317639 by: Bastien

Re: sms class
        317622 by: tamouse mailing lists
        317623 by: Matijn Woudt
        317629 by: Lester Caine

preg_replace_callback
        317640 by: TR Shaw

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On 19 Apr 2012, at 18:31, Silvio Siefke wrote:

> i have a script which should write articles in a Sqlite 0database. The script 
> runs without errors, but nothing is written to the database.
> 
> 
> The Script: http://nopaste.info/09e68c7e37.html
> The db.php: http://nopaste.info/afd4dee47a.html
> 
> The Database file has right 777. Has someone an idea? Thank u. 

The script has syntax errors in it. You won't see those errors because PHP 
won't run a script with syntax errors, so it won't modify the error_reporting 
and display_errors settings.

You can run php -l script.php to see those errors, but it would be better to 
set the error_reporting and display_errors values in php.ini on your 
development system/server.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Hello,

On Thu, 19 Apr 2012 18:39:00 +0100
Stuart Dallas <stu...@3ft9.com> wrote:

> The script has syntax errors in it. You won't see those errors because PHP 
> won't run a script with syntax errors, so it won't modify the error_reporting 
> and display_errors settings.
> 
> You can run php -l script.php to see those errors, but it would be better to 
> set the error_reporting and display_errors values in php.ini on your 
> development system/server.


gentoo-desk siefke # php -l test.php *
No syntax errors detected in test.php

gentoo-desk blog # php -l manage.php
No syntax errors detected in manage.php

gentoo-desk php # php -l db.php
No syntax errors detected in db.php


* I have written in this file only the php code. No syntax errors. 

gentoo-desk blog # php -v
PHP 5.3.10-pl0-gentoo with Suhosin-Patch (cli) (built: Apr  5 2012 00:31:12)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies           

Regards
Silvio

--- End Message ---
--- Begin Message ---
On 19 Apr 2012, at 18:54, Silvio Siefke wrote:

> On Thu, 19 Apr 2012 18:39:00 +0100
> Stuart Dallas <stu...@3ft9.com> wrote:
> 
>> The script has syntax errors in it. You won't see those errors because PHP 
>> won't run a script with syntax errors, so it won't modify the 
>> error_reporting and display_errors settings.
>> 
>> You can run php -l script.php to see those errors, but it would be better to 
>> set the error_reporting and display_errors values in php.ini on your 
>> development system/server.
> 
> 
> gentoo-desk siefke # php -l test.php *
> No syntax errors detected in test.php
> 
> gentoo-desk blog # php -l manage.php
> No syntax errors detected in manage.php
> 
> gentoo-desk php # php -l db.php
> No syntax errors detected in db.php
> 
> 
> * I have written in this file only the php code. No syntax errors. 
> 
> gentoo-desk blog # php -v
> PHP 5.3.10-pl0-gentoo with Suhosin-Patch (cli) (built: Apr  5 2012 00:31:12)
> Copyright (c) 1997-2012 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies         


I took the code on http://nopaste.info/09e68c7e37.html and put it in test.php.

stuart@fred:~$ php -l test.php 
Parse error: parse error in test.php on line 28
Errors parsing test.php

You really can't see the mismatched quotes here?

$sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
  VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title, :teaser, 
:content);';

I'm using PHP 5.3.8 on this particular machine, not that it matters with basic 
syntax errors like this.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Maybe this will make the syntax errors stand out more:

http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png

--- End Message ---
--- Begin Message ---
Hello,

On Thu, 19 Apr 2012 13:21:46 -0500
tamouse mailing lists <tamouse.li...@gmail.com> wrote:

> Maybe this will make the syntax errors stand out more:
> 
> http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png


ok i have change it to the function date, but now i has the error
message:

PDOException: SQLSTATE[HY000]: General error: 1 SQL logic error or missing 
database

The database is present, and the tables too. 

gentoo-desk db # ls
silviosiefke.db
gentoo-desk db # pwd
/var/www/silviosiefke_de/inc/db

gentoo-desk ~ # php -l test.php
No syntax errors detected in test.php

The script now -> http://nopaste.info/63fe0a9148.html

Regards
Silvio

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Silvio Siefke [mailto:siefke_lis...@web.de]
> Sent: April 19, 2012 2:53 PM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] SqLite INSERT want not write
> 
> Hello,
> 
> On Thu, 19 Apr 2012 13:21:46 -0500
> tamouse mailing lists <tamouse.li...@gmail.com> wrote:
> 
> > Maybe this will make the syntax errors stand out more:
> >
> > http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png
> 
> 
> ok i have change it to the function date, but now i has the error
> message:
> 
> PDOException: SQLSTATE[HY000]: General error: 1 SQL logic error or missing
> database
> 
> The database is present, and the tables too.
> 
> gentoo-desk db # ls
> silviosiefke.db
> gentoo-desk db # pwd
> /var/www/silviosiefke_de/inc/db
> 
> gentoo-desk ~ # php -l test.php
> No syntax errors detected in test.php
> 
> The script now -> http://nopaste.info/63fe0a9148.html
> 
> Regards
> Silvio


I think all you had to do was change this line: (line 27 in the original
paste)
$sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
:teaser, :content);';

To this:
$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
:teaser, :content);";


The issue was (without looking any deeper) the quotes...

Try that, and let us know.

Steve


--- End Message ---
--- Begin Message ---
On 19 Apr 2012, at 19:52, Silvio Siefke wrote:

> On Thu, 19 Apr 2012 13:21:46 -0500
> tamouse mailing lists <tamouse.li...@gmail.com> wrote:
> 
>> Maybe this will make the syntax errors stand out more:
>> 
>> http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png
> 
> 
> ok i have change it to the function date, but now i has the error
> message:
> 
> PDOException: SQLSTATE[HY000]: General error: 1 SQL logic error or missing 
> database
> 
> gentoo-desk ~ # php -l test.php
> No syntax errors detected in test.php
> 
> The script now -> http://nopaste.info/63fe0a9148.html

Using date() is not valid there. It's possible now() might work (don't use PDO 
so I dunno for sure), otherwise you'll need to bind that parameter in the same 
way you're binding the others.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On 19 Apr 2012, at 19:57, Steven Staples wrote:

> I think all you had to do was change this line: (line 27 in the original
> paste)
> $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
>      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);';
> 
> To this:
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);";
> 
> 
> The issue was (without looking any deeper) the quotes...
> 
> Try that, and let us know.


Still wrong. It should be as follows.

$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
     VALUES ('" . date( 'Y-m-s H:i:s', time() ) . "', :autor, :title,
:teaser, :content);";

Incidentally, the time() in the date call is unnecessary since that's the 
default value for that parameter.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On Thu, 19 Apr 2012 14:57:04 -0400
"Steven Staples" <sstap...@mnsi.net> wrote:

> I think all you had to do was change this line: (line 27 in the original
> paste)
> $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
>       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);';
> 
> To this:
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);";

Thats end with:
PDOException: SQLSTATE[HY000]: General error: 1 near "(": syntax error

I has changed what say Stuart, no Sytax errors but in the database nothing
will write. 

Regards
Silvio

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Silvio Siefke [mailto:siefke_lis...@web.de]
> Sent: April 19, 2012 3:11 PM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] SqLite INSERT want not write
> 
> On Thu, 19 Apr 2012 14:57:04 -0400
> "Steven Staples" <sstap...@mnsi.net> wrote:
> 
> > I think all you had to do was change this line: (line 27 in the
> > original
> > paste)
> > $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
> >       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> > :teaser, :content);';
> >
> > To this:
> > $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
> >       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> > :teaser, :content);";
> 
> Thats end with:
> PDOException: SQLSTATE[HY000]: General error: 1 near "(": syntax error
> 
> I has changed what say Stuart, no Sytax errors but in the database nothing
> will write.
> 
> Regards
> Silvio
> 

Ok, so I was wrong... ;)   it does happen

Try this:
$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
       VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title, 
 :teaser, :content);";

Or
$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
       VALUES (NOW(), :autor, :title, :teaser, :content);";


The first example, you don't need the time(), and you had the date format
wrong...
The second example, uses the NOW() time, which is the timestamp for sql

Maybe this time I will get it right ;) -- its been a long day, and it is
only 1/2 done

Steve


--- End Message ---
--- Begin Message ---
On Thu, Apr 19, 2012 at 2:17 PM, Steven Staples <sstap...@mnsi.net> wrote:
>> -----Original Message-----
>> From: Silvio Siefke [mailto:siefke_lis...@web.de]
>> Sent: April 19, 2012 3:11 PM
>> To: php-gene...@lists.php.net
>> Subject: Re: [PHP] SqLite INSERT want not write
>>
>> On Thu, 19 Apr 2012 14:57:04 -0400
>> "Steven Staples" <sstap...@mnsi.net> wrote:
>>
>> > I think all you had to do was change this line: (line 27 in the
>> > original
>> > paste)
>> > $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
>> >       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
>> > :teaser, :content);';
>> >
>> > To this:
>> > $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>> >       VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
>> > :teaser, :content);";
>>
>> Thats end with:
>> PDOException: SQLSTATE[HY000]: General error: 1 near "(": syntax error
>>
>> I has changed what say Stuart, no Sytax errors but in the database nothing
>> will write.
>>
>> Regards
>> Silvio
>>
>
> Ok, so I was wrong... ;)   it does happen
>
> Try this:
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>       VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title,
>  :teaser, :content);";
>
> Or
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>       VALUES (NOW(), :autor, :title, :teaser, :content);";
>
>
> The first example, you don't need the time(), and you had the date format
> wrong...
> The second example, uses the NOW() time, which is the timestamp for sql
>
> Maybe this time I will get it right ;) -- its been a long day, and it is
> only 1/2 done
>
> Steve
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

For sqlite, you can specify the current datetime with just "now".

So perhaps the insert statement could be simplified to:

$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
VALUES(now, :autor, :title, :teaser, :content);";

--- End Message ---
--- Begin Message ---
                Hello,

On Thu, 19 Apr 2012 15:17:06 -0400
"Steven Staples" <sstap...@mnsi.net> wrote:

> Ok, so I was wrong... ;)   it does happen
> 
> Try this:
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>        VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title, 
>  :teaser, :content);";

No errors, but no entry in the database. 


> Or
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>        VALUES (NOW(), :autor, :title, :teaser, :content);";


PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW

Now is not availible in Sqlite, can use date, 

Which rights must have the database?

siefke@gentoo-desk db $ ls -l
insgesamt 4
-rw-rw-rw- 1 siefke siefke 4096 19. Apr 21:25 silviosiefke.db


Regards
Silvio

--- End Message ---
--- Begin Message ---
On 19 Apr 2012, at 20:40, siefke_lis...@web.de wrote:

> On Thu, 19 Apr 2012 15:17:06 -0400
> "Steven Staples" <sstap...@mnsi.net> wrote:
> 
>> Ok, so I was wrong... ;)   it does happen
>> 
>> Try this:
>> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>>       VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title, 
>> :teaser, :content);";
> 
> No errors, but no entry in the database. 
> 
> 
>> Or
>> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>>       VALUES (NOW(), :autor, :title, :teaser, :content);";
> 
> 
> PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW
> 
> Now is not availible in Sqlite, can use date, 
> 
> Which rights must have the database?
> 
> siefke@gentoo-desk db $ ls -l
> insgesamt 4
> -rw-rw-rw- 1 siefke siefke 4096 19. Apr 21:25 silviosiefke.db

What does the script output? The only path through your script that doesn't 
display something is if there are missing $_POST elements, and the PDO errors 
you've shown previously suggest that they're all present and correct.

So if the thing is running correctly, regardless of what's going into the DB, 
you should be getting some sort of output. Are you?

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: siefke_lis...@web.de [mailto:siefke_lis...@web.de]
> Sent: April 19, 2012 3:40 PM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] SqLite INSERT want not write
> 
>               Hello,
> 
> On Thu, 19 Apr 2012 15:17:06 -0400
> "Steven Staples" <sstap...@mnsi.net> wrote:
> 
> > Ok, so I was wrong... ;)   it does happen
> >
> > Try this:
> > $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
> >        VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title,
> > :teaser, :content);";
> 
> No errors, but no entry in the database.
> 
> 
> > Or
> > $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
> >        VALUES (NOW(), :autor, :title, :teaser, :content);";
> 
> 
> PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW
> 
> Now is not availible in Sqlite, can use date,
> 
> Which rights must have the database?
> 
> siefke@gentoo-desk db $ ls -l
> insgesamt 4
> -rw-rw-rw- 1 siefke siefke 4096 19. Apr 21:25 silviosiefke.db
> 
> 
> Regards
> Silvio
> 


Ok, shot in the dark here....   are you closing your connection to the
sqlite db?   From what I see, you're not... when I was writing an app in
Python, I remember having this issue, and because I didn't close the
connection, it didn't commit the writes to the database...   just a
thought...

Steve.


--- End Message ---
--- Begin Message ---
Hello,

On Thu, 19 Apr 2012 20:43:52 +0100
Stuart Dallas <stu...@3ft9.com> wrote:

> On 19 Apr 2012, at 20:40, siefke_lis...@web.de wrote:
> 
> > On Thu, 19 Apr 2012 15:17:06 -0400
> > "Steven Staples" <sstap...@mnsi.net> wrote:

> What does the script output? The only path through your script that doesn't 
> display something is if there are missing $_POST elements, and the PDO errors 
> you've shown previously suggest that they're all present and correct.
> 
> So if the thing is running correctly, regardless of what's going into the DB, 
> you should be getting some sort of output. Are you?

Ah im so shamed now. I have only look at the size not in the database.
I has make now a SELECT and all is well done. Im sorry, i should stopped
try to "programming" with php. 

All is good, thank u so much. All wish nice rest of day or a nice day 
where ever you are. 

Regards
Silvio

--- End Message ---
--- Begin Message ---
On Thu, Apr 19, 2012 at 12:40 PM, siefke_lis...@web.de
<siefke_lis...@web.de> wrote:
>                Hello,
>
> On Thu, 19 Apr 2012 15:17:06 -0400
> "Steven Staples" <sstap...@mnsi.net> wrote:
>
>> Ok, so I was wrong... ;)   it does happen
>>
>> Try this:
>> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>>        VALUES ('" . date('Y-m-d H:i:s') . "', :autor, :title,
>>  :teaser, :content);";
>
> No errors, but no entry in the database.
>
>
>> Or
>> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>>        VALUES (NOW(), :autor, :title, :teaser, :content);";
>
>
> PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW
>
> Now is not availible in Sqlite, can use date,
>

Technically, it's date('now') per [1] :)  RTFM FTW!


http://www.sqlite.org/draft/lang_datefunc.html

--- End Message ---
--- Begin Message ---
On Thu, 19 Apr 2012 13:00:40 -0700
Tommy Pham <tommy...@gmail.com> wrote:

> Technically, it's date('now') per [1] :)  RTFM FTW!

Yes its right, i have read it on sqlite.org. 

PS: Excuse me, what mean RTFM FTW?


Regards
Silvio

--- End Message ---
--- Begin Message ---

Bastien Koert

On 2012-04-19, at 4:11 PM, Silvio Siefke <siefke_lis...@web.de> wrote:

> On Thu, 19 Apr 2012 13:00:40 -0700
> Tommy Pham <tommy...@gmail.com> wrote:
> 
>> Technically, it's date('now') per [1] :)  RTFM FTW!
> 
> Yes its right, i have read it on sqlite.org. 
> 
> PS: Excuse me, what mean RTFM FTW?
> 

Read The Fine Manual For The Win



> 
> Regards
> Silvio
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
> ---------- Forwarded message ----------
> From: DZvonko Nikolov <dzvo...@yahoo.com>
> Date: Thu, Apr 19, 2012 at 5:10 AM
> Subject: Re: [PHP] sms class
> To: tamouse mailing lists <tamouse.li...@gmail.com>
>
>
> if this is simple, yes.
>
>
> -----------------------------------------------------------------------------------
> Regards
>
> DZvonko Nikolov
>
>
> dzvo...@gmail.com
> dzvo...@yahoo.com
> -----------------------------------------------------------------------------------
> The best things are simple,
> but finding these simple things is not simple.
>
>
> Simplicity carried to the extreme becomes elegance.
> -----------------------------------------------------------------------------------
>
> ________________________________
> From: tamouse mailing lists <tamouse.li...@gmail.com>
> To: DZvonko Nikolov <dzvo...@yahoo.com>
> Cc: "php-gene...@lists.php.net" <php-gene...@lists.php.net>
> Sent: Thursday, April 19, 2012 7:19 AM
> Subject: Re: [PHP] sms class
>
> On Tue, Apr 17, 2012 at 2:08 PM, DZvonko Nikolov <dzvo...@yahoo.com> wrote:
> > I need a class that sends sms messages to list of numbers.
> > I'm quite new to that issue, so I need to know what I need
> > more. Thanks in advance.
>
> If this is very low volume, would using email->sms work?
>
>

(Remember to 1: post back to the list, 2: reply at the bottom)

Look here: https://en.wikipedia.org/wiki/List_of_SMS_gateways

Mailing stuff from php is also dead easy:
http://us2.php.net/manual/en/book.mail.php

--- End Message ---
--- Begin Message ---
On Wed, Apr 18, 2012 at 10:31 PM, Matijn Woudt <tijn...@gmail.com> wrote:
> On Wed, Apr 18, 2012 at 9:53 PM, Lester Caine <les...@lsces.co.uk> wrote:
>> Matijn Woudt wrote:
>>>
>>> It should be possible to hack up an android phone and write some
>>> software that sends messages from there, though using one of the
>>> provided services is much simpler.
>>
>>
>> I have the phone already configured, but it requires a SIM card that ALLOWS
>> sending messages via the data port. All UK SIM's are locked to only work
>> from the phone itself :( This service IS available in other countries which
>> is where the data came from ...
>>
>>
>
> That's why I said, hack an android phone. You can simulate it is send
> by the phone itself with enough programming skills.
>
> Matijn

Thinking again about this, Android does already support it out of the
box. (See [1]).

You could also try one of these:
DesktopSMS, EasySMS, RemoteSMS, Droid Messenger, MightyText, BrowserTexting


- Matijn

[1] 
http://developer.android.com/reference/android/telephony/SmsManager.html#sendTextMessage(java.lang.String,
java.lang.String, java.lang.String, android.app.PendingIntent,
android.app.PendingIntent)

--- End Message ---
--- Begin Message ---
Matijn Woudt wrote:
On Wed, Apr 18, 2012 at 10:31 PM, Matijn Woudt<tijn...@gmail.com>  wrote:
On Wed, Apr 18, 2012 at 9:53 PM, Lester Caine<les...@lsces.co.uk>  wrote:
Matijn Woudt wrote:

It should be possible to hack up an android phone and write some
software that sends messages from there, though using one of the
provided services is much simpler.


I have the phone already configured, but it requires a SIM card that ALLOWS
sending messages via the data port. All UK SIM's are locked to only work
from the phone itself :( This service IS available in other countries which
is where the data came from ...



That's why I said, hack an android phone. You can simulate it is send
by the phone itself with enough programming skills.

Matijn

Thinking again about this, Android does already support it out of the
box. (See [1]).

You could also try one of these:
DesktopSMS, EasySMS, RemoteSMS, Droid Messenger, MightyText, BrowserTexting


- Matijn

[1] 
http://developer.android.com/reference/android/telephony/SmsManager.html#sendTextMessage(java.lang.String,
java.lang.String, java.lang.String, android.app.PendingIntent,
android.app.PendingIntent)

THAT is more or less what I currently have. The SIM security basically prevents it from working simply because you are bypassing the authentication process. I've wasted a lot of time on this to date. I can quite happily push messages into the phone, but it refuses to forward them on. Ideally I want to use the mobile phone approach since SMS messages CAN get through where we can't get web access, so the mobile patrols can report position back to the main web service, but at the moment we have to have a body on the other end of a phone to manually complete the loop - so over night it does not happen :( All the talk about about 'faster mobile internet access' is just a pipe dream around here. You may need to stand on the roof of the car to even get the phone to work ;) We've had to install private wireless links in places and adding data to THAT is another complete rip-off!

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
It appears that preg_replace_callback has a memory leak  at least in version 
5.3.8.



--- End Message ---

Reply via email to