Hi,
Can someone please give me the ASP of this PHP code?
<?php
echo file_get_contents($myv);
?>
It gets the entire content of a webpage and displays it on the page where the code runs. Supports http:// also.
I think I will first have to set the variable “myv” using:
dim myv=”http://site.com?id=33″;
Is that right?
Thanks for helping.
Try this
Code:
<% Function getUrl(urltogo) GotothisURL = urltogo on error resume next Set GetConnection = CreateObject("Microsoft.XMLHTTP") on error resume next GetConnection.Open "get", GotothisURL, False GetConnection.Send ResponsePage = GetConnection.responseText Set GetConnection = Nothing ResponsePage = removeChars(ResponsePage) if err.description = "" then getUrl = ResponsePage else getUrl = "News not found" end if end functionfull_content = getUrl("http://www.mobile.am") small_content = getUrl("http://www.mobile.am") if full_content = "" then full_content = "<H3>Not found, invalid URL</h3>" end if if small_content = "" then small_content = "<H3>Not found, invalid URL</h3>" end if %>
Leave a Reply
You must be logged in to post a comment.