Log in

View Full Version : how to send orders from webshop to fax



sozz
04-29-2006, 02:22 PM
i need a script that sends the orders from my webshop to my suppliers fax. is that possible? i was thinking i could use a modem to send the data, but i don't know how to send the correct data to the modem- is there any help out there? :D

Twey
04-29-2006, 03:56 PM
It's possible, but I'm not sure as to the specifics of how to implement it. Sorry.

djr33
04-30-2006, 04:03 AM
I guess you'd need to use the IP of the fax machine or something, then just send the data, but in the right format.

No clue.

For some reason I'd think this would be better in some other language than PHP, 'cause it's so advanced.

Maybe CGI.

Twey? What do you think?

If you do want to use php, just look at php.net, and if its available it'll be there somewhere. Or, maybe it's only as an extension. In that case, google "fax php"... but no clue.

This would be cool, though.

sozz
04-30-2006, 06:16 AM
well im gonna take a look at php.net or check out my options with cgi... ill give some feedback if i figure it out :)

djr33
04-30-2006, 06:28 AM
Note: thought about it more... the fax machine doesn't have an IP... just a telephone number... you'd need to connect to the phone system.
Might as well write a php script to make a phone call, but send fax data instead. same thing, really.... just different data.

sozz
04-30-2006, 08:06 AM
yeah i got to the same result. i figured i would use my phone line- i got unlimited calls anyway. but i have no clue on how to write such a script :(

djr33
04-30-2006, 08:30 AM
The thing is... php is a net based thing... why are you bothering with that?
You're talking about using a phone line.

Make your own program, not a webpage.

And, looked a bit on php.net out of curiosity, and found nothing.
There are some cool features I saw, though, but nothing relevant, heh.
(Like one that reads text as sound... no clue how you play it... but... interesting :p)

sozz
04-30-2006, 10:17 AM
the only problem is that i have no clue on how to make such a program :)
but a mate of mine (the one im doing this project with) is studying java programming and he thought he might be able to figure it out. i have been trying to find other alternatives on the internet, but i cant seem to find anything relevant

djr33
04-30-2006, 10:44 AM
Twey says it's possible in php. I'm surprised.
Still... seems like you could just do this with a program. You're gonna have to learn something, heh.

Hmm... you're kinda confusing me. You say about your 'webshop' and at the same time about your fax.... just you? other users?

Twey
04-30-2006, 11:26 AM
The important thing to remember is that there should be a program to handle this already.
If you're running a *n?x server, you can install fax(1), efax(1) and efix(1) and use fax (http://www.die.net/doc/linux/man/man1/fax.1.html)(1); then it's just a case of adding a shell_exec() call in the right place. If you're using Windows, you'd have to try to find an equivalent (CLI-based fax-handling program), or send the data to the modem and/or device manually. This is where it would get tricky. I think that would be possible in PHP, but you may have to use a more powerful language for some of the low-level stuff.

sozz
04-30-2006, 01:11 PM
Sorry to confuse you :) my english isn't very good...
i will try to explain the project-
a mate and i are working on a system where small supermarkets can sign up for a free webshop. Therefore i need a script or program which can handle the orders from the different webshops. All of the orders will go through our system, to the correct supermarket, by fax.
I hope im not confusing even more :D but so far- thank you very much for your help :)

Twey
04-30-2006, 02:21 PM
Yes, my suggestion should serve.

djr33
04-30-2006, 08:13 PM
Ok. Now I get it.

Not to be simplistic, but why not just have it print, then they can fax it to whoever they want?
Or it gets sent to you as html or something, then you can fax.

There are also things like efax.com, but I think that's more for getting faxes than sending... might send too, though

Basically.... you should still deal with getting the info through php or whatever you want, but then should move to something better for the faxing.
Use a local program connected to your fax to send out all of the (for lack of a better term) attachments you recieve.


Or... go ahead and try to program it through php, but then you've got a bunch of faxes coming through that you aren't monitoring (or if you are, wouldn't be any less easy than if you just did it by hand anyway)


Interesting, though... I'll be curious to see how this turns out.


Thought: could you buy a fax/printer combo and somehow use that to your advantage? Maybe you could do something easy to reprogram it, or maybe there's a default setting. Or just write a totally new thing, but at least it would already be recieving a signal from the computer.

Twey
04-30-2006, 08:28 PM
you've got a bunch of faxes coming throughThe OP does not wish to receive faxes.
Thought: could you buy a fax/printer combo and somehow use that to your advantage? Maybe you could do something easy to reprogram it, or maybe there's a default setting. Or just write a totally new thing, but at least it would already be recieving a signal from the computer.... what? How would a fax/printer combo allow him/her to write a program to send data via fax?

djr33
04-30-2006, 08:49 PM
The OP does not wish to receive faxes.Yeah... I meant traveling through his fax line.

Well... I dunno. But a fax/printer combo would be connected to the computer. Surely there's some type of communication language between the two, and all you'd have to do is fake it til it sends a fax instead of printing... its just a different button the machine, and, therefore, a different command. Might also have some type of default thing already setup.
I'm not seeing this as an easy fix... so... something's gotta be a starting point, even if it's not great.


Note: mentioend efax before.... http://www.efax.com/en/efax/twa/page/homePage?location=us-ca-panorama.gif&CMP=OTC-us_ca
See if you can figure out what system they're using. Might just be fax machines and scanners... but probly not.

Twey
04-30-2006, 08:59 PM
I'm not seeing this as an easy fix... so... something's gotta be a starting point, even if it's not great.Or... rather than wasting time on that... one could just figure out the commands the fax drivers use. :)
Still requires a lower-level language than PHP -- at least on Windows, where devices aren't so easily accessible to programs; on *n?x, of course, my solution will serve quite adequately -- and still requires a large investment of time. And I mean large. You're talking about the OP writing his/her own drivers. I don't think this is a viable option, really.

djr33
04-30-2006, 09:06 PM
Or... rather than wasting time on that... one could just figure out the commands the fax drivers use.
Certainly. As long as it IS connected to the computer (which is why I said a printer combo... usb would come in handy), but, yeah, sure :)

Drivers vs. 'lower level language'.... whatever... not sure how well either will work... but... still will be interested to see what happens :)

ustat
05-12-2006, 12:08 PM
Yes, You can send faxes from PHP..
But you cant do it with only PHP. You need a 3rd party fax application.

A few months ago, it was a big problem for me .
Finally i developped a fax application called FaxCarrier that can connect your web site with Http protocol.
And I used this application for a lot of customers.

The main idea is easy.
Run FaxCarrier on a windows machine which has a traditional fax modem device and internet connection. After a small configuration, you can start to send faxes from your web site.

For more information you can send me an email or you can visit my web site.
I can send you code samples.

info@intelligentsoftwares.com
www.intelligentsoftwares.com/FaxCarrierEn.asp

djr33
05-12-2006, 06:23 PM
Are you offering it as freeware/shareware? Care to post here? I'm interested :)

Twey
05-12-2006, 07:02 PM
Certainly. As long as it IS connected to the computerTelnet would work.