Sign in to follow this  
Followers 0
BinaryBrother

AutoIt and PHP work together nicely

6 posts in this topic

#1 ·  Posted (edited)

Only 1 file is needed for my example (Plus a txt file on the server CHMOD to 755 or better "input.txt").

I searched the forum a bit, and didn't find any other samples that were really simple and easy to work with. So I made my own... :D

#include <INet.au3>
$Var = "Stuff to write"
$null = _InetGetSource("http://www.test.com/add.php?write=" & $Var)

add.php ; This is used so that AutoIt may use it to write strings to a txt file on a server.

<?php
$file = "input.txt";
$write = $_GET['write'];
$write = strip_tags($write,'<strong><b><i>');
$write = stripslashes($write);
$fp = fopen($file,"a");
fwrite($fp, $write);
fclose($fp);
?>

Just posting this for anyone looking for a highly simplistic PHP AutoIt Bridge (Kinda)

Edited by BinaryBrother

Share this post


Link to post
Share on other sites



Although I see the usefullness of the example I don't think there's anyone looking for a PHP AutoIt bridge that couldn't have come up with this themselves. What would be cooler is if some code generation (for both the AutoIt and PHP code) would be used to create a PHP AutoIt bridge using functions that the user can specify.

Share this post


Link to post
Share on other sites

I don't think there's anyone looking for a PHP AutoIt bridge that couldn't have come up with this themselves.

Well, for the longest time, I really needed this bit of code, but used complex forms (Pre-built guestbooks) with 100+ lines of PHP code, that I had no idea how to use properly, and could only attempt to use by filling forms using the IE UDF...

This took me about 45 mins of hitting the books to figure out, even though I've worked with PHP for a long time, I've never used the File functions. So I would imagine that someone with no real PHP background might have taken much longer. (Not that I have any real PHP background)

Not all of us are as smart as you Manadar! :D

P.S. In my defense (Taking so long to figure such a simple script out) I had $_GET confused with $_POST for the majority of the time trying to figure it out... lol

Although some would say I would have been better off leaving that out if my intention was to look smarter... x.x lol

I just hope this helps someone, because it really twisted my brain for a bit... :D

Share this post


Link to post
Share on other sites

If someone as bright as you spent this amount of time on it then who I am to question you posting this.

Now about that code generation .. :D

Share this post


Link to post
Share on other sites

I did something similar to this as well. Can check here if you want for another example of using php and autoit.

1 person likes this

"The quieter you are, the more you are able to hear..."

My AppsUSB Finder

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0