Executing a php script.
Author |
Message |
darkangel
|
Posted: Wed Oct 22, 2008 6:07 pm Post subject: Executing a php script. |
|
|
the below is a simple html reader, I was wondering if there is anyway to execute a php script with this. I tried and it read the HTML, but stopped when it reached the php. The funny thing is that this program should end when it reaches the end of the file. However it didn't end, meaning it KNEW that there was more and just couldn't get to it. Is there any way around this?
(Also to all newbies the php script will not execute unless a server or the cgi exe runs it. So don't just save it to your desktop and expect it to run.)
The Turing.
code: | var name, age, temp : string
get name
get age
var stream : int
var address : string
% the 192.168.0.197/...... is my home server. BTW
stream := Net.OpenURLConnection ("192.168.0.197/site/ajax/submit.php?name=" + name +
"&age=" + age)
if stream <= 0 then
put "Nope."
return
end if
delay (1000)
loop
exit when eof (stream)
get : stream, temp : *
put temp
end loop |
the php
code: | This is some html
<?php
$fullname = $_GET['name'];
$age = $_GET['age'];
echo "Your name is $fullname and your age is $age";
?> |
the above is a simple html scanner, I was wondering if there is anyway to execute a php script with this. I tried and it read the HTML, but stopped when it reached the php. The funny thing is that this program should end when it reaches the end of the file. However it didn't end, meaning it KNEW that there was more and just couldn't get to it. Is there any way around this?
(Also to all newbies the php script will not execute unless a server or the cgi exe runs it. So don't just save it to your desktop and expect it to run.)
Any help would be appreciated, this could be a step for turing to interact with mySQL |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|