Désolé pour le dernier post.
Automator trouve bien l'image mais ne récupère pas la nouvelle téléchargée et affiche tjs la boite de dialogue. Existe t-il un moyen pour qu'Automator se relance toute les 20 secondes et qu'il n'affiche pas la boite de dialogue d'impression?
Hors ligne
Yeah !
ça fait plaisir ça !
Merci !
On a monté la machine cette aprem, ça broie du toner.
Par contre on cherche maintenant a envoyer cette page : www.tomrider.fr/randim.php par mail toutes les 25sec.
J'ai trouvé un soft (namtuk) qui permet d'imprimer sans boite de dialogue le corps d'un mail des sa réception.
on est pres du but !
merci encore pour toutes vos réponses et avis...
Dernière modification par TAK (2013-02-21 20:40:16)
Hors ligne
première page de chauffe...
<?php
$topic = $_GET["topic"];
function GetRandomImageURL($topic='', $min=0, $max=100)
{
// get random image from Google
if ($topic=='') $topic='image';
$ofs=mt_rand($min, $max);
$geturl='http://www.google.com/images?q=' . $topic . '&start=' . $ofs . '&gbv=1' . '&safe=off';
$data=file_get_contents($geturl);
$f1='<div id="center_col">';
$f2='<a href="/imgres?imgurl=';
$f3='&imgrefurl=';
$pos1=strpos($data, $f1)+strlen($f1);
// if ($pos1==FALSE) return FALSE;
$pos2=strpos($data, $f2, $pos1)+strlen($f2);
// if ($pos2==FALSE) return FALSE;
$pos3=strpos($data, $f3, $pos2);
// if ($pos3==FALSE) return FALSE;
return substr($data, $pos2, $pos3-$pos2);
}
//montrer
function ShowRandomImage($topic='')
{
echo('<table border="0"><tr><td>');
$url=GetRandomImageURL($topic);
if ($url==FALSE) return ($geturl);
else {
echo('<img width="640" src="' . $url . '" />');
}
}
function RandomTopic() {
$alphabet = "abcdefghijklmnopqrstuvwxyz";
$topic = '';
for ($i=0; $i < 6; $i++) {
$topic .= substr($alphabet, rand(0, strlen($alphabet) - 1), 1);
}
return $topic;
}
if ($topic == '') $topic = RandomTopic();
ShowRandomImage($topic);
?>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="20; URL=http://tomrider.fr/randim.php">
</head>
<?php
$our_email = "imprimantebroyeuse@gmail.com";
$to = "imprimantebroyeuse@gmail.com";
$from = $our_email;
$subject = "yoursubject";
$message = "http://tomrider.fr/randim.php";
$mail = mail($to, $subject, $message, "From: $our_email");
if ($mail) {
echo "Mail Sent";
}
else {
echo "Error - Mail Not Sent";
}
?>En gros on essaye d'envoyer l'url de l'image dans le corps du message.
envoyer nous des signaux lumineux, ou un talkie wolkie par la poste !
Hors ligne
Pages: 1 2