Grodo Posted August 2, 2007 Share Posted August 2, 2007 Hello! Hello Again! Im tring to include an .asp page into a .php page how ever it is not working. include("http://www.xxxx.com/index.asp"); After some googleing research I have found out that there were some problems with this. I have been unsuccessful on finding a redemy for this curse. I have read some people using data scraping methods to extract the data; but they never left any code behind. If any one could point me in the right direction that would be great! This is the error I keep getting Warning: main() [function.main]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/xx/public_html/phpharvest.php on line 198 Warning: main(http://www.xxx.com/SearchResults.asp?Cat=377) [function.main]: failed to open stream: Success in /home/xx/public_html/phpharvest.php on line 198 Warning: main() [function.include]: Failed opening 'http://www.xx.com/SearchResults.asp?Cat=377' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xx/public_html/phpharvest.php on line 198 Thank You Grodo Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/ Share on other sites More sharing options...
premiso Posted August 2, 2007 Share Posted August 2, 2007 It may not just be the .asp page. Make sure you have fopen_url_wrappers on in your php.ini file. If you are using shared hosting, chances are this is disabled. You may try using www.php.net/file_get_contents or www.php.net/file if those fail and you have cURL installed, I would suggest using curl. www.php.net/curl Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314362 Share on other sites More sharing options...
Grodo Posted August 2, 2007 Author Share Posted August 2, 2007 hmmmm Ill give it a try see what i can do... The fopen urls will not work because i got shared Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314370 Share on other sites More sharing options...
premiso Posted August 2, 2007 Share Posted August 2, 2007 hmmmm Ill give it a try see what i can do... The fopen urls will not work because i got shared Then chances are nothing will work. Just one of the glorious wonders of shared hosting! Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314373 Share on other sites More sharing options...
Grodo Posted August 2, 2007 Author Share Posted August 2, 2007 HMMMM =/ lOOKS like im goign to have to Java redirect then how ever im gonna try to figure this out Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314378 Share on other sites More sharing options...
Grodo Posted August 2, 2007 Author Share Posted August 2, 2007 Well I found out it is possible I just cant get the code to work with my service. ini_set (user_agent, "Your Name Here"); ini_set (default_socket_timeout, "3"); error_reporting(0); $theurl="http://www.xxxx.com/promo.asp?8329"; $filestring=file_get_contents("$theurl") ; $filestring = str_replace("../images/", "www.xxxx.com/images/", $filestring); echo "$filestring"; Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314386 Share on other sites More sharing options...
Barand Posted August 2, 2007 Share Posted August 2, 2007 Use an IFRAME maybe <?php echo "<iframe src='http://www.domain.com/mypage.asp' width='600' height='600'></iframe>" ?> Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314400 Share on other sites More sharing options...
Grodo Posted August 3, 2007 Author Share Posted August 3, 2007 problem with iframes is that most people have them disabled if anything ill just do a timed java redirect Link to comment https://forums.phpfreaks.com/topic/63101-php-not-compatible-with-asp-pages/#findComment-314986 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.