Help!php Posted March 26, 2012 Share Posted March 26, 2012 I am trying to run a php code on my site but it kept on saying page cannot be found. Any idea why its saying that??? Quote Link to comment https://forums.phpfreaks.com/topic/259744-the-page-cannot-be-displayed/ Share on other sites More sharing options...
dragon_sa Posted March 26, 2012 Share Posted March 26, 2012 Have no idea you have not given us any info or code, we have to guess what you are doing, not found usually means your file paths are incorrect Quote Link to comment https://forums.phpfreaks.com/topic/259744-the-page-cannot-be-displayed/#findComment-1331231 Share on other sites More sharing options...
Help!php Posted March 26, 2012 Author Share Posted March 26, 2012 Sorry.. Well I am trying to read a sitemap and get the URL and the page is not displaying. But I managed to change one of the name to true and its printing what I echoed but no result. $_ECHO = TRUE; This was false before. Now that I have changed it to true.. It prints START: Fetching site map.. then it goes straight to NO URL FOUND ON THIS PAGE. its skipping the middle bits. any help??? $numSitemapPages = 1; $html = new simple_html_dom(); if($_ECHO) echo "START: Fetching site map...<br />"; for( $i = 0; $i < $numSitemapPages; $i++ ) { if($_ECHO) echo "Page $i<br />"; $fileContents = file_get_contents( "http://www.website.co.uk/SiteMap" . $i . ".aspx" ); $html->load( $fileContents ); $hrefs = $html->find( "a(style=color: Blue; text-decoration: underline;)" ); if ( isset( $hrefs[ 0 ] ) ) { foreach( $hrefs as $href ) { $url = "http://www.website.co.uk/" . $href->href; $qry = "INSERT INTO SITEMAP (url) VALUES( '$url' )"; mysql_query( $qry, $con ); if($_ECHO) echo "MYSQL: Added $href->href to DB<br />"; } } else if($_ECHO) echo "NO URLS FOUND ON THIS PAGE!<br />"; } Quote Link to comment https://forums.phpfreaks.com/topic/259744-the-page-cannot-be-displayed/#findComment-1331238 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.