Jump to content

PHP not Compatible with .asp pages?


Grodo

Recommended Posts

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

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

 

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";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.