# Execute PHP Script

**URL:** <https://forum.sambapos.com/t/execute-php-script/2079>\
**Category:** V4 Request\
**Created:** [August 10, 2014, 1:37am UTC](https://forum.sambapos.com/t/execute-php-script/2079 "2014-08-10T01:37:34Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![sukasem](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@sukasem](https://forum.sambapos.com/u/sukasem)\
**Post date:** [April 9, 2015, 11:21pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/21 "2015-04-09T23:21:17Z")

</div>

Can we upgrade from V4 to V5 or need to all over again?

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [April 10, 2015, 12:51am UTC](https://forum.sambapos.com/t/execute-php-script/2079/22 "2015-04-10T00:51:37Z")

</div>

You will be able to upgrade.

---

<div class="post-metadata">

**Author:** ![Hasa](https://forum.sambapos.com/user_avatar/forum.sambapos.com/hasa/32/50950_2.png) [@Hasa](https://forum.sambapos.com/u/Hasa)\
**Post date:** [April 10, 2015, 3:44am UTC](https://forum.sambapos.com/t/execute-php-script/2079/23 "2015-04-10T03:44:19Z")

</div>

Wow sweet. Cannot wait! @kendash

---

<div class="post-metadata">

**Author:** ![allmixedup](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allmixedup](https://forum.sambapos.com/u/allmixedup)\
**Post date:** [April 10, 2015, 3:49am UTC](https://forum.sambapos.com/t/execute-php-script/2079/24 "2015-04-10T03:49:55Z")

</div>

@Jesse

do you know what is this ? 1421429654321-0500

it’s header called OrderStates in Orders table but i want to know how i can generate that # its Date

This is eniter line  
[{“D”:"/Date(1421429654321-0500)/",“OK”:“000000”,“S”:“Discount”,“SN”:“DStatus”,“SV”:"",“U”:1},{“D”:"/Date(1421429748352-0500)/",“OK”:“000000”,“S”:“Submitted”,“SN”:“Status”,“SV”:"",“U”:1},{“D”:"/Date(1421429748266-0500)/",“OK”:“000000”,“S”:“Earned”,“SN”:“Promotion”,“SV”:"",“U”:1}]

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [April 10, 2015, 5:50am UTC](https://forum.sambapos.com/t/execute-php-script/2079/25 "2015-04-10T05:50:25Z")

</div>

@allmixedup what are you trying to do with that number?

---

<div class="post-metadata">

**Author:** ![allmixedup](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allmixedup](https://forum.sambapos.com/u/allmixedup)\
**Post date:** [April 10, 2015, 2:53pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/26 "2015-04-10T14:53:53Z")

</div>

@Jesse  
try to insert those numbers directly in table so web site order can come to sambapos like it;s entered from samabpos

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [April 10, 2015, 3:18pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/27 "2015-04-10T15:18:41Z")

</div>

> [@allmixedup](#):
>
> do you know what is this ? 1421429654321-0500

That is a Unix Epoch timestamp which represents seconds elapsed since Jan.1, 1970.

Ways to convert it using different programming languages, and explanation here:

> **[Epoch Converter](https://www.epochconverter.com/)**
>
> Convert Unix Timestamps (and many other date formats) to regular dates.

---

<div class="post-metadata">

**Author:** ![allmixedup](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allmixedup](https://forum.sambapos.com/u/allmixedup)\
**Post date:** [April 10, 2015, 5:08pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/28 "2015-04-10T17:08:47Z")

</div>

@QMcKay

Thanks for that link.

if it’s work than one step closer to website order integration to sambapos

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [April 10, 2015, 5:14pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/29 "2015-04-10T17:14:55Z")

</div>

V5 may allow a better integration without direct altering the db. Making direct alterations could mean your system might break if future updates ever change db structure any at all. The past has proven it can and has changed a few times.

Just don’t want you to waste a bunch of time on something and then it break because of an update.

Specifically we are close to testing a new API it does not have order related stuff yet but eventually I don’t see why it couldn’t.

---

<div class="post-metadata">

**Author:** ![allmixedup](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allmixedup](https://forum.sambapos.com/u/allmixedup)\
**Post date:** [April 10, 2015, 5:20pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/30 "2015-04-10T17:20:57Z")

</div>

@Jesse

it will just insert the data from web order to sambaPOS DB just like order entered through samba pos but this is automatic every 15 sec. if order arrived from website.

so even if we upgrade it will work as far as table name and header are same  
i want to make sure that data will be written same way as samabpos write in DB so both program work with out making any issue.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [April 10, 2015, 5:35pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/31 "2015-04-10T17:35:39Z")

</div>

What I am saying is the way samba writes to db could change. Its best not to directly write to db. We may get tools to integrate in a way that samba will handle it without you needing to edit the db directly.

You can do whatever you want obviously I just think if you don’t mind waiting there might be a better solution with v5 in near future. If you can’t wait then by all means sambapos will let you do what you described.

---

<div class="post-metadata">

**Author:** ![allmixedup](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allmixedup](https://forum.sambapos.com/u/allmixedup)\
**Post date:** [April 10, 2015, 6:08pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/32 "2015-04-10T18:08:33Z")

</div>

@Jesse

Since you mention V5 can you tell me if V5 will have Credit card Processing?

after this web integration next thing is Credit card

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [April 10, 2015, 6:40pm UTC](https://forum.sambapos.com/t/execute-php-script/2079/33 "2015-04-10T18:40:21Z")

</div>

Right now the version we are testing there is no built in solution. But and big but, with the new scripting and API it may be possible to integrate a web solution.

[Previous page](https://forum.sambapos.com/t/execute-php-script/2079.md?page=1)
