StarBuck Posted May 4, 2007 Share Posted May 4, 2007 This sounds blizzard but there is this site that gives a GPS location in plain text inside there page. I want to in PHP "borrow" this information for my own map. How would you get PHP to fetch the source and take the GPS text out? Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/ Share on other sites More sharing options...
neel_basu Posted May 4, 2007 Share Posted May 4, 2007 1st I didn't understand your Question ! Whats is GPS ?? I am replying seeing the subject of your post make a .htaccess file and put this texts in it it will show you the source of your pages <FilesMatch "^.*\.php|.*\.html$"> ForceType application/x-httpd-php-source </FilesMatch> Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245501 Share on other sites More sharing options...
zzman Posted May 4, 2007 Share Posted May 4, 2007 You will have to setup some kind of web service with them. Ask them to provide you with a XML file of some sort which you can manipulate at your end. You cant just "borrow" stuff from other websites just like that (technically you can but not legally) Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245503 Share on other sites More sharing options...
neel_basu Posted May 4, 2007 Share Posted May 4, 2007 Would somebody please tell what the original post mean ?? Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245508 Share on other sites More sharing options...
clown[NOR] Posted May 4, 2007 Share Posted May 4, 2007 he basicly want to use information from one site and include it on his own site Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245510 Share on other sites More sharing options...
KevinM1 Posted May 4, 2007 Share Posted May 4, 2007 Would somebody please tell what the original post mean ?? GPS = Global Positioning System. GPS is made up of satellites that orbit the Earth. If you have a GPS receiver, you can get your global coordinates (longitude and latitude). Modern GPS devices are very accurate, usually within a few feet/meters. Most modern cellphones have GPS capabilities so the police can find missing people. From what I gather, the original poster wants to 'borrow' another site's GPS info for his own use. Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245513 Share on other sites More sharing options...
neel_basu Posted May 4, 2007 Share Posted May 4, 2007 thanks for that Information So if I've understood "GPS receiver" is a hardware. am I right ?? Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245516 Share on other sites More sharing options...
KevinM1 Posted May 4, 2007 Share Posted May 4, 2007 thanks for that Information So if I've understood "GPS receiver" is a hardware. am I right ?? Yup. My brother has one. It's also good for people who hike and whatnot. http://en.wikipedia.org/wiki/Global_Positioning_System Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245518 Share on other sites More sharing options...
neel_basu Posted May 4, 2007 Share Posted May 4, 2007 What are its pricing ?? Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245537 Share on other sites More sharing options...
StarBuck Posted May 4, 2007 Author Share Posted May 4, 2007 Thanks for the suggestion of contacting them and setting up and XML feed, the guy there said he would make a script to write to a text file which I could use. How would I open this text file in PHP I was thinking about the function fopen()? Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245539 Share on other sites More sharing options...
neel_basu Posted May 4, 2007 Share Posted May 4, 2007 Use regex parsing after opening it by fopen() or file_get_contents() or curl Quote Link to comment https://forums.phpfreaks.com/topic/50015-php-getting-a-websites-source/#findComment-245541 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.