Jump to content

thegadgitman

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Everything posted by thegadgitman

  1. I have a few pieces of script that have to interact with each other. The 1st script makes up some variables and these have to be passed to other scripts. I am having problems getting them into the other script. Say Script1.php makes variables $a1 $a2 $a3 Srcipt2.php needs to read these indipendantly of script1.php Any help would be great. I do know the post and get commands but dont seem to be able to get them to work. An example would be great. THANKS.
  2. OK that worked. Installed GD and re wrote code. Images are combining. just need to resize them and add new code back into old code and all should be OK.
  3. I agree, I have just been trying to add the GD package to PHP, that can do the same job. Just trying to get it working now.
  4. No it doesnt. Is no different to any other PHP code, When I take the 4 lines out the code runs perfectly. But does not function as it should as the pictures are not there.
  5. I did not think they were standard, maybe a plugin for PHP, Cannot find where they may be on the other machine.
  6. I have had some code written for me in PHP on one machine and now trying to run it on another machine. However when I try and run these lines the PHP script stops and does not get passed them. How do I get these commands to run. They add a boarder to a picture, basically combine a .jpg file and a .png file into one. There is more scrip, but these are the lines where the script stops. THANKS. @addframe( "cap1.jpg" , "frame1.png" , "pics/newa.jpg"); @uploadfile("pics/newa.jpg"); @addframe( "cap2.jpg" , "frame2.png" , "pics/newb.jpg"); @uploadfile("pics/newb.jpg");
  7. I have a small project. I have a control board that is connected to the parallel port. It controls 8 strips of LED on the LPT1 port. I can turn these on and off via the command prompt, using LPTOUT.exe ie lptout 1 turns on the 1st LED lptout 2 will turn off 1st LED and turn on 2nd, lptout 4 turns on 3rd and 2nd off, etc 1, 2, 4, 8, 16, 32, 64, 128. and combinations ie lptout 3 turns on LEDS 1 and 2, and so on. However lptout seems very unresponsive sometimes I have to do lptout 1 twice before LED 1 turns on. Is there another command I can use to write to LPT1 port. I need some PHP code to control the outputs. I want to sequence the outputs ie 1on (1second) 2on (1 second) 3 on (1 second) 4 on etc. to 8, then all off then repeat. Can anyone help me. THANK YOU.
  8. JOB DONE. Have to change Apache Permissions. Control Panel, Admin Tools, Services. Look for Apache 2.2, Double click. Select Log On, Tick Box - Allow services to interact with your desktop. Apply setting, re-start Apache. BINGO. File now opens. THANKS for the help.
  9. Thanks, same results using system. Just a Bong sound and file appears in Task Manager. Yes the file can be run from command line. I also have the same problem with other .exe files. HOW do I change the permissions ??
  10. OK have checked safe mode etc in PHP.ini Safemode is off and files in correct directory. This does not work. PC goes BONG and file opens in file Manager, but does not run. <?php exec("hvk.exe"); //Call on screen keyboard ?> This code works fine, windows keyboard opens, WHY ???? I need to use the keyboard above. <?php exec("osk.exe"); //Call windows on Screen keyboard ?>
  11. Sorry am very new to PHP but am trying to learn fast. How do I check, or turn on and off safemode and where is the 'safedir' Sorry if I seem thick but I need to learn. THANK YOU
  12. I am trying to call up an on screen keyboard with a very simple code on Localhost. However the PC just makes a BONG sound and nothing opens but the file is shown in the TASK MANAGER as running, but it is not. What am I doing wrong. hvk.exe is the prog I am trying to run and is in Localhost directory. <?php exec("hvk /SHOWKEYBOARD"); ?>
  13. SOLVED. Just changed 1 line and photos are now being displayed $mime->addAttachment($file, 'image/jpeg');
  14. Thanks for that. No is not that. If i send from email1@*****.com to email2@yahoo.com via the PHP code then no picture is displayed, it is a blank thumbnail. but the image can be downlaoded. If i send from email1@*****.com to email2@yahoo.com via outlook, then the picture is displayed in the receiving mail. Confusing the H*** out of me.
  15. Hi i am new to PHP scripts but am learning fast. I have apache, PHP and pear installed and am trying to send an email with a .jpg file attatched. I have just about managed to do this with a lot of searching on the net. HOWEVER, the receiving mail does not display the picture, (example@yahoo.com) it displays a blank thumbnail. If I send the same message, from the same email to the same email from outlook the receiving mail displays the picture as a thumbnail. WHY IS THIS HAPPENING ??? Can anyone solve this problem. Here is the code I found to use. THANK YOU. Using Pear mail.php and mime.php <?php require_once "c:/php/pear/mail/Mail.php"; // PEAR Mail package require_once ('c:/php/pear/mime/mime.php'); // PEAR Mail_Mime packge $from = "info@*******.com"; $to = "example@yahoo.com"; $subject = 'Picture from info@******.com'; $headers = array ('From' => $from,'To' => $to, 'Subject' => $subject); $text = 'Text version of email';// text and html versions of email. //$html = '<html><body>HTML version of email. <strong>This should be bold</strong></body></html>'; $file = 'C:/pics/testpic1.jpg'; // attachment $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $mime->addAttachment($file, 'text/plain'); //do not ever try to call these lines in reverse order $body = $mime->get(); $headers = $mime->headers($headers); //Smtp email authentication $host = "mail.*******.com"; $username = "info@*******.com"; $password = "**********"; $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username,'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.