PHP Help, Please.
- Started
- Last post
- 14 Responses
- pcas
Hi,
i have 2 domainsi want to use 'php include' to insert some text onto domain A, from domain B...
how do i do this?
any help, will be greatly appreciated.
- toastie0
include() should work fine over domains. Though, I did have a problem with it outputting an XML file once, in which case readfile() should do.
- pcas0
it's not working, here's what i'm putting in;
- pcas0
try that again. here's what i'm using;
[? include("http://www.quantumgroup... ?]
- ave0
Are you running a Windows server?
- pcas0
both domains are on *nix
- pcas0
i'm using other includes on the same page. they are all working if they are on the same domain.
but they don't work if they're external domains.
- toastie0
oh, yeah, of course. You cant execute php files across domains. You can only get their output. Is that what you're trying to do?
- ave0
any errors?
- pcas0
ok, i can now include the file ok.
there were firewall problems with one of the servers or something.
But, now i have another problem, you just mentioned; i can't execute php on domain B.
i have a variable which is set on domain A, and i want the included file on domain B to use that variable.
how can i do this?
- pcas0
btw, thanks for your help so far guys!
- ave0
you can't. At least not that I know of. :(
- ave0
actually... if I'm not mistaken...
You could have the script on the remote server spit out php code. use php code to compile php code... but that seems kinda crazy... forget I said that! :) unless you want to try it.
- pcas0
i think i'll just try some javascript variable jazzery instead. what you suggested sounds miles above what i know about this type of thing. :)
thanks again :)
- toastie0
pcas, there might be some workaround for this. check out the #php channel on the Freenode IRC server, it's really the best resource I can recommend.