ID:160804
 
This is easier to explain in code...
var/mob/html_mob=new(locate(0,0,0))
...
html_mob<<browse(html)
//the html var was this long series of php and stuff
//im sure you dun wana see that...

Needless to say it didn't work. Is there another method of browsing an html files? Like World.Export(html) or something, or is it not possible to send a file unless they'res a client recieving it?
If it is impossible i want to know how to make an popup. Not an <a href=site>popup, no work automatic popup.
You can store all the HTML and PHP in a file, and then use that file. I don't know if you can just output it directly or not. If you can't, use file2text() and output the return value of that proc.
I'm not even sure what you're trying to do.
Like, you mean, displaying a page to a player, but without the player? Right...
In response to Kaioken
im trying to just send some stuff to mah server, kao. but the stuff changes in game and i want to do that without disrupting a mob.(or giving him the chance to edit)
In response to Popisfizzy
Popisfizzy wrote:
You can store all the HTML and PHP in a file, and then use that file. I don't know if you can just output it directly or not. If you can't, use file2text() and output the return value of that proc.

text2file(html,"temp.html")
html_mob<<file2text("temp.html")

that?
In response to Popisfizzy
You can use world.export

get_php()
var/http[] = world.Export("http://www.url.com")
if(http)
var/F = file("file.txt")
F << http["content"]

Then just do whatever you need with the file
In response to Tubutas
Stolen Soul has shown how to do it if it's an online webpage. If it's stored on your computer, though, this is one way:
mob/proc/show_page(file)
var/text = fexists(file) && file2text(file)
if(text) browse(text)
In response to Popisfizzy
On that note, browse also has a display argument that will optionally let you not display the page and will only add it to the rsc file. Just in case that's why you're outputting it to a mob that can't really view it.
In response to StolenSoul
Pop your code didn't work for me
mob/proc/showpage(file)//75
var/text = fexists(file) && file2text(file)//76
if(text)browse(text)//77!?!
fdel(file)//78

lol.dm:77:text:warning: statement has no effect
lol.dm:77:browse :warning: unused label

so i tried src<<browse(text) to no avail as well. I'm sure the php code works because if i don't delete the temp file and just open it up in firefox, then it works fine.
In response to Tubutas
Er, whoops. src << browse(text) should work. If it doesn't, I don't know the problem.
In response to Tubutas
Using php code from within DM requires that you pull it in already parsed. Which means you'd either have to use a shell command or world.export

The reason is that DM as far as I know anyway will not call the php interpreter for you on a file. If it is a local file, ie on the same machine that you're running and you can pull it up from your browser ie. http://127.0.0.1 then you can use the world.export method to access it.
In response to StolenSoul
Stolen, your not even close to the problem, the php works. Thats not what the post is about.
In response to Popisfizzy
@PIF....it works execpt its limited to only GETing, not POSTing.