OZONE Asylum
Forums
Mad Scientists' Laboratory
XML > proxy > parse > AGGGGGHHHHH!
This page's ID:
28948
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
This is actually pretty simple. I am guessing that you want to take a list form a external site and display their links on your site? So what you do is the following: 1. Create a php page using the TP supplied code. [code]<?php function fetchRemoteURL ( $strURL ) { $strResult = ''; $fh = fopen ( $strURL, "rb"); if ( $fh ) { while ( !feof ( $fh ) ) $strResult .= fread ( $fh, 8192 ) ; } return $strResult; } header('Content-type: text/xml'); print fetchRemoteURL('http://jobs.cerebra.co.uk/xml.php?number=5'); ?>[/code] 2. Upload this page to your web server. You will now be able to call it via http://yoursite.com/yourfile.php since the XML now appears to come from your site you have gotten around the off site issue. 3. Now you can use your JavaScript knowledge to parse this file and do the display stuff based on the AJAX stuff you mentioned before. Dan [url=http://www.codetown.org]Code Town[/url] | [url=http://www.zombiehead.org]Zombie Head[/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »