PDA

View Full Version : use php result in HTML


saymaad
02-28-06, 07:57 AM
When I type this text in my browser :
http://www.mysite.com/down/stats.php?ACT=latest&limit=5

my browser returns :
-Winall Wallpapers
-Windows XP SP3 beta
------------------------

Now I want to show this result in a cell of my .html page how can I do this ?
When both line are hyperlinks. The following dosent works

<?php
readfile ("http://www.mysite.com/down/stats.php?ACT=latest&limit=5");
?>

plz help I am noob in php

Christian
03-01-06, 12:07 PM
First of all you have to tell your web server to use .html as php....put the following in a .htaccess file(assuming you are using apache):
AddType application/x-httpd-php .htmlThen try again, if nothing happens or there is a error please post here. :)

saymaad
03-01-06, 11:58 PM
Well thnx for the reply but last time I used .htaccess I slow down my whole server and I was even not able to upload any thing.

I could have use this but now I have converted my .htmls into .php and used php tags to enter php scripts its working fine but if someone know a problem using this please reply.

thnx again dead-poetic.