View Full Version : calling php from Miva pages
erichar11
08-03-06, 01:26 AM
Is it possible to call a php script from within side miva pages, for example a catagory page? I tried the standard <?php include(myfilehere.php) ?> but that didn't work. So anyone know if this can be done, and if so how.
Thanks
PCINET - Andreas
08-03-06, 02:24 AM
Simple answer ... NO
But you can include html files.
erichar11
08-03-06, 02:29 AM
Hi Andres, after putting up this message and search google, there does seem to be a way and it works well as far as I can tell. If you have openui, you can do the following:
%CALL(http://www.mydomain.com/myscript.php|GET)%
It works. Thought you and others would like to know.
Eric
ILoveHostasaurus
08-03-06, 03:14 AM
Keep in mind there is one downside to doing it that way; for each request that comes in, you're going to show twice the number of bytes as what actually left the server in your log files since a request from merchant for the php page will come in and be logged, and then merchant's output will include the data that came from the php so it gets logged again as part of the merchant request. If you have a very high traffic site, or your host charges a lot for traffic, it could add up over time.
erichar11
08-03-06, 10:04 PM
Thanks David for the info, well I host with you :) Can you think of a better method to call php from within a Miva page. Would moving to Miva 5 help in this regard or would the same problem occur?
Our site is brand new, we have not even officially relased yet as there is more functionality I have to implement.
ILoveHostasaurus
08-03-06, 10:07 PM
Even more of a limitation in MM5 since you don't have access to the tokenized call tag that OUI provides. If it's not something that needs to appear on secure pages, you could use an iframe. Or if it's just returing a small bit of data, it probably won't really matter anyway; i.e., if it only sends back 2 kilobytes of data, you'd have to request it a few million times before it would really matter.
jason - jmh web services
08-03-06, 11:11 PM
Thanks David for the info, well I host with you :) Can you think of a better method to call php from within a Miva page. Would moving to Miva 5 help in this regard or would the same problem occur?
Our site is brand new, we have not even officially relased yet as there is more functionality I have to implement.
Weiland's tool kit (http://www.emporiumplus.com/merchant2/merchant.mvc?Screen=PROD&Product_Code=1AA00223&Affiliate=jasonh) and ADS external file pro (http://www.jmhonline.net/miva-modules/external+file+pro) make it quite easy in v5.
Jason
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.