|
![]() |
|
| Author |
|
|||||||
|
SquarkyD
Posts: 5691
Location: Brisbane, Queensland
|
ok heres my problem. i have a php photo gallery which has a random image function which i can call using
< ?php @readfile('http://www.mywebsite.com/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ? > now what i need to do is embed the results of that php call into a HTML file on another server which doesnt support PHP. Is there anyway i can get the output into the html easily? cheers. |
|||||||
| #0 03:13pm 18/05/06 |
|
|||||||
|
system
|
--
|
|||||||
| #0 |
|
|||||||
|
Fizzer
Posts: 433
Location: Brisbane, Queensland
|
There you go :P last edited by Fizzer at 15:12:49 18/May/06 |
|||||||
| #1 03:12pm 18/05/06 |
|
|||||||
|
SquarkyD
Posts: 5693
Location: Brisbane, Queensland
|
ta ;)
|
|||||||
| #2 03:14pm 18/05/06 |
|
|||||||
|
Fizzer
Posts: 434
Location: Brisbane, Queensland
|
if all that function does is generate a random image and then display it why not just have the main.php file produce an image.
I.e. header('image/jpg'); echo $image_file; then in the html all you would need to do is <img src="http://www.mywebsite.com/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title" /> |
|||||||
| #3 03:17pm 18/05/06 |
|
|||||||
|
SquarkyD
Posts: 5694
Location: Brisbane, Queensland
|
no it also generates captions and a link to the specific folder in the gallery which i want. also i dont wanna f*** around with the main.php because its got alot of s*** in it.
|
|||||||
| #4 03:38pm 18/05/06 |
|
|||||||
|
scuzzy
Posts: 12217
Location: Brisbane, Queensland
|
you could wrap it all in a nasty javascript document.write('htmlhere');
|
|||||||
| #5 03:51pm 18/05/06 |
|
|||||||
|
SquarkyD
Posts: 5695
Location: Brisbane, Queensland
|
care to post an example scuzzy? :)
|
|||||||
| #6 03:59pm 18/05/06 |
|
|||||||
|
stinky
Posts: 1569
Location: Brisbane, Queensland
|
Can you put it inside an iframe and call it from the machine that does have php?
<iframe src="http://phpserver/display_random.php"> </iframe> then just put that line in the http://phpserver/display_random.php file on the server with php. |
|||||||
| #7 05:40pm 18/05/06 |
|
|||||||
|
Jim
Posts: 4388
Location: Brisbane, Queensland
|
now what i need to do is embed the results of that php call into a HTML file on another server which doesnt support PHP.find something the other server _does_ support and use that to make the request, otherwise you can't do what you're asking. you need to be able to make a http request from the other server |
|||||||
| #8 07:15pm 18/05/06 |
|
|||||||
|
hast
Posts: 756
Location: Brisbane, Queensland
|
|
|||||||
| #9 08:53pm 18/05/06 |
|
|||||||
|
system
|
--
|
|||||||
| #9 |
|
|||||||
|
| ||||||||