Re: How to display a website content on another
From: Pedro Graca (hexkid_at_hotpop.com)
Date: 01/13/04
- Next message: Tom Jones: "MS SQL server Meata data question"
- Previous message: CountScubula: "Re: How to display a website content on another"
- In reply to: Brian Murphy: "How to display a website content on another"
- Next in thread: Chung Leong: "Re: How to display a website content on another"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Jan 2004 23:29:53 GMT
Brian Murphy wrote:
> I have a php-based yahoo-like web directory.I wanna give webmasters
> the possiblity to integrate my whole directory in their websites with
> their own formatting.I wanna this inclusion to be possible to all
> kinds of websites (ASP,PHP,... or just HTML).There are basically two
> files in my website:
> -index.php : shows the main categories along with 3 sample
> subcategories.
> -index1.php : displays the subcategories and sites of categories
> (exactly like yahoo!).
> I wanna make possible the browsing of the categories from those
> websites.The user shouldn't notice this content comes from
> outside.However, I wanna be able to know how many users used my
> directory from those websites.Any help will be
> welcome!
If I understood you correctly, I'd do a page to download the categories
and links with various formats.
Something like
download.php?format=html&categories=all
or download.php?format=csv&categories=php%2casp
or download.php?format=php&categories=html
...
Then download.php outputs the requested categories in the requested
format (maybe you should validate the requester first -- IP, cookie, add
a pwd to the URL, ...), and logs the request.
Of course, the requester may download the data once per week, but have
it viewed (more and more out-of-date) several times per day; you have no
way to force them to always use the more recent data.
If they request the format=html, with php, they'd do
include('http://www.yourdomain.com/download.php?format=html');
and have the data presented to their users the way you format it for
html;
with a request of format=csv, they'd get the data into a string and
parse and display it (or save into _their_ database), for example, they
might receive
"php","http://www.php.net/","The source for php data."
"asp","http://www.microsoft.com/","ASP at it's source."
with a request of format=php (my favourite!) they'd get the result of
your command:
<?php echo serialize($data_array); ?>
and they just do
<?php
$brian_data = unserialize(file_get_contents('http://www.yourdomain.com/download.php?format=php'));
?>
to have your data neatly packed into their $brian_data array :)
Hope I made sense,
Happy Coding!
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
- Next message: Tom Jones: "MS SQL server Meata data question"
- Previous message: CountScubula: "Re: How to display a website content on another"
- In reply to: Brian Murphy: "How to display a website content on another"
- Next in thread: Chung Leong: "Re: How to display a website content on another"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|