{"id":10237,"date":"2023-01-05T12:02:05","date_gmt":"2023-01-05T15:02:05","guid":{"rendered":"https:\/\/ajuda.locaweb.com.br\/?post_type=ht_kb&#038;p=10237"},"modified":"2023-01-27T11:46:29","modified_gmt":"2023-01-27T14:46:29","slug":"como-usar-o-asphttp-hospedagem-de-sites","status":"publish","type":"ht_kb","link":"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-usar-o-asphttp-hospedagem-de-sites\/","title":{"rendered":"Como usar o AspHttp &#8211; Hospedagem de Sites"},"content":{"rendered":"    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\"><b>Informa\u00e7\u00e3o!<\/b><\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tO componente\u00a0<b>AspHttp<\/b>\u00a0\u00e9 um componente ASP que retorna o c\u00f3digo HTML da p\u00e1gina requisitada. O exemplo abaixo retorna a p\u00e1gina HTML do dom\u00ednio especificado.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<ul>\n<li>Para testar o script, pode-se alterar o dom\u00ednio que ser\u00e1 requisitado.<\/li>\n<\/ul>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\"><b>Observa\u00e7\u00e3o!<\/b><\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tEste componente \u00e9 funcional somente hospedagens Windows 2003<b>.<\/b>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h6><span id=\"Requisi.C3.A7.C3.A3o_de_c.C3.B3digo_HTML\" class=\"mw-headline\">Requisi\u00e7\u00e3o de c\u00f3digo HTML<\/span><\/h6>\n<pre class=\"de1\"><span class=\"sy0\">&lt;<\/span>%\r\n<span class=\"kw1\">SET<\/span> HttpObj <span class=\"sy0\">=<\/span> Server<span class=\"sy0\">.<\/span>CreateObject<span class=\"br0\">(<\/span><span class=\"st0\">\"AspHTTP.Conn\"<\/span><span class=\"br0\">)<\/span>\r\nHTTPObj<span class=\"sy0\">.<\/span>Url <span class=\"sy0\">=<\/span> <span class=\"st0\">\"http:\/\/www.google.com.br\"<\/span>\r\nHTTPObj<span class=\"sy0\">.<\/span>RequestMethod <span class=\"sy0\">=<\/span> <span class=\"st0\">\"GET\"<\/span>\r\nstrResult <span class=\"sy0\">=<\/span> HTTPObj<span class=\"sy0\">.<\/span>GetURL\r\nresponse<span class=\"sy0\">.<\/span><span class=\"kw1\">WRITE<\/span> <span class=\"br0\">(<\/span>strResult<span class=\"br0\">)<\/span>\r\n<span class=\"kw1\">SET<\/span> HttpObj <span class=\"sy0\">=<\/span> Nothing\r\n%<span class=\"sy0\">&gt;<\/span><\/pre>\n    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\"><b>Conhe\u00e7a!<\/b><\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tAproveite e conhe\u00e7a outros produtos da Locaweb, como o Cloud Server PRO, <a href=\"https:\/\/www.locaweb.com.br\/cloud\/cloud-server-pro\/\" target=\"_blank\" rel=\"noopener noreferrer\">clique aqui<\/a> e saiba mais!    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n","protected":false},"excerpt":{"rendered":"<p>Para testar o script, pode-se alterar o dom\u00ednio que ser\u00e1 requisitado. Requisi\u00e7\u00e3o de c\u00f3digo HTML &lt;% SET HttpObj = Server.CreateObject(&#8220;AspHTTP.Conn&#8221;) HTTPObj.Url = &#8220;http:\/\/www.google.com.br&#8221; HTTPObj.RequestMethod = &#8220;GET&#8221; strResult = HTTPObj.GetURL response.WRITE (strResult) SET HttpObj = Nothing %&gt;<\/p>\n","protected":false},"author":6,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[119],"ht-kb-tag":[418],"class_list":["post-10237","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-hospedagem-de-sites","ht_kb_tag-categoriahospedagem"],"_links":{"self":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/10237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/comments?post=10237"}],"version-history":[{"count":4,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/10237\/revisions"}],"predecessor-version":[{"id":29642,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/10237\/revisions\/29642"}],"wp:attachment":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/media?parent=10237"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-category?post=10237"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-tag?post=10237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}