This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<request login="your-login" password="your-password"> | |
<push media="fax" type="on_demand" name="Test API Fax"> | |
<message type="doc"> | |
0M8R4KGxGuEAAAAA[...]AAAAAAAAAAAAAAAA | |
</message> | |
<recipients> | |
<add target="+33 170248254"/> | |
</recipients> | |
</push> | |
</request> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Récupération du document en base64 | |
$filename = 'test-fax.doc'; | |
$binary = fread(fopen($filename, 'r'), filesize($filename)); | |
$binary = base64_encode($binary); | |
// Création du XML à poster | |
$xml = '<request login="your-login" password="your-password"> | |
<push media="fax" type="on_demand" name="Test API Fax PHP"> | |
<message type="doc">'.$binary.'</message> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<request login="demo" password="demo"> | |
<push media="fax" | |
type="campaign" | |
name="ref-alphanum" | |
start_date="01/01/2015 15:00:00"> <!-- N'oubliez pas le chevron de fermeture ! --> | |
<message type="doc">000000-base64-000000</message> | |
<fax_config tries="2"> | |
<recipients> | |
<add target="+33 123456788" ref_target="uniq-id-for-report" /> | |
<add target="+33 123456789" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<message type="multi"> | |
<message type="/doc /pdf /tiff">000000-base64-000000</message> | |
<message type="/doc /pdf /tiff">000000-base64-000000</message> | |
</message> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<response> | |
<push status="ok" status-detail="on_demand fax created" pages="2" /> | |
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<request login="demo" password="demo"> | |
<notifications media="fax" | |
seek="id-notification" | |
max="100" /> | |
</request> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<response> | |
<notifications status="ok" position="17694933"> | |
<notification id-notifcation="17694930"> | |
<status>PROGRESS</status> | |
<date>02/03/2017 09:19:27</date> | |
<state-desc>RAS</state-desc> | |
<sms-state>0</sms-state> | |
<ref_target>uniq-sms-id-12</ref_target> | |
<ref_group>Campagne SMS Test</ref_group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<personnal_redlist media="fax"> | |
<add target="+33 123456789" comment="Le client a renvoyé un fax raturé"/> | |
<remove target="+33 300000001"/> | |
</personnal_redlist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
// Récupération du document en base64 | |
string filename = "test-fax.doc"; | |
byte[] file = System.IO.File.ReadAllBytes(filename); | |
string binary = System.Convert.ToBase64String(file, 0, file.Length); | |
// Création du XML à poster | |
var xml = @"<request login=""your-login"" password=""your-password""> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub Main(ByVal Args() As String) | |
' Récupération du document en base64 | |
' --------------------------------------- | |
Dim filename As String = "test-fax.doc" | |
Dim file() As Byte = System.IO.File.ReadAllBytes(filename) | |
Dim binary As String = System.Convert.ToBase64String(file, 0, file.Length) | |
' Création du XML à poster | |
' -------------------------- |
OlderNewer