crmamx Posted March 6, 2011 Share Posted March 6, 2011 I am linking to this program. directions.php <?php ?> <h2>Directions to Magnolia Field</h2> <p>It is at the end of Lillie Lane which is an improved dirt/rock road.<br /> <h2>VIEWING THE MAP</h2> <p>The flying field is shown on the map by the pointer.</p> <p>Left click the controls on the left side of the map to make it larger or smaller.</p> <a href="http://www.aardvarkmap.net/maps/D3A46MB4"></a> I want the link shown in the program to execute without me doing anything else, that is I want the map to display after the text. How can I do that? Quote Link to comment Share on other sites More sharing options...
trq Posted March 6, 2011 Share Posted March 6, 2011 I'm afraid your going to need to be allot more specific. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 6, 2011 Author Share Posted March 6, 2011 I'm afraid your going to need to be allot more specific. I am looking at one of my web pages (any of them). On the left is the Nav menu. One of the items on the menu is Directions to field. When I click it, it links to directions.php. I want directions.php to display the text and also the map. directions.php <?php ?> <h2>Directions to Magnolia Field</h2> <p>It is at the end of Lillie Lane which is an improved dirt/rock road.<br /> <h2>VIEWING THE MAP</h2> <p>The flying field is shown on the map by the pointer.</p> <p>Left click the controls on the left side of the map to make it larger or smaller.</p> <a href="http://www.aardvarkmap.net/maps/D3A46MB4"></a> The text displays ok and of course the href does not execute. How do I get the map to display on this page? p.s. What happened to the php icon on the compose page? Quote Link to comment Share on other sites More sharing options...
trq Posted March 6, 2011 Share Posted March 6, 2011 How do I get the map to display on this page? You could try.... include 'http://www.aardvarkmap.net/maps/D3A46MB4'; p.s. What happened to the php icon on the compose page? It disappeared when the board was upgraded. Use tags for now. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 6, 2011 Author Share Posted March 6, 2011 Here is the program, kinda simple. <?php include 'http://www.aardvarkmap.net/maps/D3A46MB4'; ?> <h2>Directions to Magnolia Field</h2> <p>It is at the end of Lillie Lane which is an improved dirt/rock road.<br /> <h2>VIEWING THE MAP</h2> <p>The flying field is shown on the map by the pointer.</p> <p>Left click the controls on the left side of the map to make it larger or smaller.</p> I get these errors. Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/bayare27/public_html/content/pages/directions.php on line 2 Warning: include(http://www.aardvarkmap.net/maps/D3A46MB4) [function.include]: failed to open stream: no suitable wrapper could be found in /home/bayare27/public_html/content/pages/directions.php on line 2 Warning: include() [function.include]: Failed opening 'http://www.aardvarkmap.net/maps/D3A46MB4' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/bayare27/php') in /home/bayare27/public_html/content/pages/directions.php on line 2 I don't understand them because I use include other places and it works. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 6, 2011 Share Posted March 6, 2011 That means that url_fopen() is disabled, which disables including via a URL. Include works other places because you're using a filesystem path to include the file. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 That means that url_fopen() is disabled, which disables including via a URL. Include works other places because you're using a filesystem path to include the file. Ok, rules out that idea. So what do I do to get the map to appear on the page with the text? Quote Link to comment Share on other sites More sharing options...
trq Posted March 7, 2011 Share Posted March 7, 2011 Without decent hosting you might not be able to fetch this content, you could try curl. (http://php.net/curl). What kind of hosting do you have? Do you have access to change the url_fopen setting? Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 Without decent hosting you might not be able to fetch this content, you could try curl. (http://php.net/curl). What kind of hosting do you have? Do you have access to change the url_fopen setting? I am using InMotion which I thought was a complete package? I don't know. I will have to contact the host. I emailed them a problem ticket earlier but as yet don't have a reply. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 Is there a place on cPanel where I could check or change it? Quote Link to comment Share on other sites More sharing options...
DavidAM Posted March 7, 2011 Share Posted March 7, 2011 Have you considered using an IFRAME? I don't have much experience with it, but I think it will do what you want. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 Have you considered using an IFRAME? I don't have much experience with it, but I think it will do what you want. Yes! The site I now have uses Iframes and it works fine. But I am told that the site is old, drab, 1990's and Iframes have to go. So therein lies the source of my problem. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 7, 2011 Share Posted March 7, 2011 that your old site may have been crap doesn't mean you should banish iframes for everything certainly if there is no alternative. Which i think is the case now. at http://www.aardvarkmap.net it seem they give a 3 step way to implement it. make sure your width match. include seems to not work here since your host won't allow it but i think most host won't Quote Link to comment Share on other sites More sharing options...
optioned Posted March 7, 2011 Share Posted March 7, 2011 iframes should not go completely. Obviously they are not preferred but if you remove scrolling and work out the width and height correctly then they can make a long job short. I do agree with the above however unless you have access to a cPanel or on your hosting providers control panel they give you the control to allow this you may have to either try and see if you can make up some kind of code to grab the html of the page (file open external which may be blocked) and separate the bits you do not require (can be messy esp if they / the map location changes the html) which is one of the few alternatives to includes or you may have to create a hidden iframe. (Hidden iframe meaning an iframe but no body other than coders will be able to tell it is in fact an iframe) Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 7, 2011 Share Posted March 7, 2011 Btw in case this place your linking to is a static one (which i think for some reason it is since it's an airstrip) You might as well make a print-screen (image) of it and slice it the way you want. that way you wont have to use anything difficult. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 As usual thorpe and pikachu are right on the money. email from InMotion We're sorry that you're experiencing this trouble. From the errors it looks like you want to turn "allow_url_include" to On in your local PHP configuration. It is off by default. If everything is for a reason, why is this value off as a default? What am I getting into by turning it on? I have tried to research this and it appears that my php is running as a CGI Module (whatever that means) and therefore the values for my php are set up in a php.ini file in public_html. The file exists and I have access to it. But I am scared to mess with it. Do I download it, make the changes and then upload it? I have never messed with an ini file. What do I use to edit it with? Can I use Komodo or Wordpad which I use for everything else? Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 7, 2011 Author Share Posted March 7, 2011 You guys are amazing. With a little help from InMotion I was able to go into php.ini and add the statement. Even tho the php core configuration showed it was turned off, the file did not include the statement so I had to add it. And now I don't get the errors but I get this alert message. This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/signup.html. Just curious as to why it does not work here in the program previously listed but it works fine on my old site. P.S. used phpMyAdmin to modify the file. Quote Link to comment Share on other sites More sharing options...
crmamx Posted March 13, 2011 Author Share Posted March 13, 2011 Without decent hosting you might not be able to fetch this content, you could try curl. (http://php.net/curl). What kind of hosting do you have? Do you have access to change the url_fopen setting? Dead on the money. With the help of InMotion I was able to go into cPanel and add it set to on. But in the meantime I found this was the code I needed to get the map to display: <!-- iFrame code for AardvarkMap.net Start --> <iframe src="http://www.aardvarkmap.net/mapitrans/VIZSVU7K" width="582" height="435" frameborder="0" scrolling="auto" marginwidth="0" marginheight="0" allowtransparency="true"></iframe> Thanks guys for your help. Now if I could only figure out how to get my slideshows and videos to work! :'( Quote Link to comment 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.