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

 

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.