{"id":24864,"date":"2017-10-15T12:35:36","date_gmt":"2017-10-15T07:05:36","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=24864"},"modified":"2017-10-15T12:35:36","modified_gmt":"2017-10-15T07:05:36","slug":"web-browser-project-c-c-program-open-websiteurl","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/web-browser-project-c-c-program-open-websiteurl\/","title":{"rendered":"Web browser project in c, c program to open a website\/url"},"content":{"rendered":"<p>This program opens a website entered by the user. User can open any website .It will launch Mozilla Firefox web browser to open a website so it should be installed on your computer, if you are using an another web browser then you can change the path in the program.<\/p>\n<h2 id=\"c-programming-code\">C programming code<\/h2>\n[pastacode lang=\u201dc\u201d manual=\u201d%23include%20%3Cstdio.h%3E%0A%23include%20%3Cconio.h%3E%0A%23include%20%3Cstdlib.h%3E%0A%23include%20%3Cgraphics.h%3E%0A%23include%20%3Cdos.h%3E%0A%23include%20%3Cstring.h%3E%0A%20%0Avoid%20initialize_graphics_mode()%3B%0Aint%20get_key()%3B%0Avoid%20draw()%3B%0A%20%0Aunion%20REGS%20i%2C%20o%3B%0A%20%0Amain()%0A%7B%0A%20%20int%20key%2C%20i%20%3D%200%2C%20xpos%2C%20ypos%2C%20button%3B%0A%20%20char%20arr%5B200%5D%2C%20temp%5B5%5D%2C%20*ptr%3B%0A%20%20char%20a%5B%5D%20%3D%20%22C%3A%5C%5CProgra~1%5C%5CMozill~1%5C%5Cfirefox%20%22%3B%0A%20%0A%20%20strcpy(arr%2Ca)%3B%0A%20%0A%20%20i%20%3D%20strlen(a)%3B%0A%20%0A%20%20initialize_graphics_mode()%3B%0A%20%0A%20%20draw()%3B%0A%20%0A%20%20while(1)%0A%20%20%7B%0A%20%20%20%20if(kbhit())%0A%20%20%20%20%20%20key%20%3D%20get_key()%3B%0A%20%0A%20%20%20%20if((key%3E%3D97%26%26key%3C%3D122)%7C%7C(key%3E%3D65%26%26key%3C%3D90)%7C%7Ckey%3D%3D46%7C%7Ckey%3D%3D47%7C%7Ckey%3D%3D63)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20arr%5Bi%5D%20%3D%20key%3B%0A%20%20%20%20%20%20sprintf(temp%2C%22%25c%22%2Carr%5Bi%5D)%3B%0A%20%20%20%20%20%20outtext(temp)%3B%0A%20%20%20%20%20%20if(getx()%3E470)%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20clearviewport()%3B%0A%20%20%20%20%20%20%20%20moveto(5%2C2)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20i%2B%2B%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20(%20key%20%3D%3D%2013%20)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20arr%5Bi%5D%20%3D%20\u2019%5C0\u2019%3B%0A%20%20%20%20%20%20system(arr)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20(%20key%20%3D%3D%2027%20)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20closegraph()%3B%0A%20%20%20%20%20%20exit(EXIT_SUCCESS)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if(button%3D%3D1%26%26xpos%3E%3D150%26%26xpos%3C%3D480%26%26ypos%3E%3D300%26%26ypos%3C%3D330)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20system(%22C%3A%5C%5CProgra~1%5C%5CMozill~1%5C%5Cfirefox%20programmingsimplified.com%22)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20key%20%3D%20-1%3B%0A%20%20%7D%0A%20%0A%20%20closegraph()%3B%0A%20%20return%200%3B%0A%7D%0A%20%0Avoid%20initialize_graphics_mode()%0A%7B%0A%20%20int%20gd%20%3D%20DETECT%2C%20gm%2C%20errorcode%3B%0A%20%0A%20%20initgraph(%26gd%2C%26gm%2C%22C%3A%5C%5CTC%5C%5CBGI%22)%3B%0A%20%20errorcode%20%3D%20graphresult()%3B%0A%20%0A%20%20if(%20errorcode%20!%3D%20grOk%20)%0A%20%20%7B%0A%20%20%20%20printf(%22Graphics%20error%20%3A%20%25s%5Cn%22%2Cgrapherrormsg(errorcode))%3B%0A%20%0A%20%20%20%20printf(%22Press%20any%20key%20to%20exit\u2026%5Cn%22)%3B%0A%20%20%20%20getch()%3B%0A%20%20%20%20exit(EXIT_FAILURE)%3B%0A%20%20%7D%0A%7D%0A%20%0Aint%20get_key()%0A%7B%0A%20%20i.h.ah%20%3D%200%3B%0A%20%20int86(22%2C%26i%2C%26o)%3B%0A%20%0A%20%20return(%20o.h.al%20)%3B%0A%7D%0A%20%0Avoid%20draw()%0A%7B%0A%20%20settextstyle(SANS_SERIF_FONT%2CHORIZ_DIR%2C2)%3B%0A%20%20outtextxy(275%2C11%2C%22Web%20Browser%22)%3B%0A%20%20outtextxy(155%2C451%2C%22%3Ca%20href%3D%22http%3A%2F%2Fwww.programmingsimplified.com%22%22%3Ewww.programmingsimplified.com%22%3C%2Fa%3E)%3B%0A%20%20outtextxy(5%2C105%2C%22Enter%20URL%20%3A%20%22)%3B%0A%20%20rectangle(120%2C100%2C600%2C130)%3B%0A%20%20setviewport(121%2C101%2C599%2C129%2C1)%3B%0A%20%20moveto(5%2C1)%3B%0A%7D\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]\n","protected":false},"excerpt":{"rendered":"<p>Web browser project in c, c program to open a website\/url &#8211; c programming &#8211; It will launch Firefox web browser to open a website so it should be installed.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82927,1],"tags":[83295,83287,83291,83284,83297,83298,83294,83300,83301,83285,83290,83289,83288,83299,83292,83283,83286,83296,83293],"class_list":["post-24864","post","type-post","status-publish","format-standard","hentry","category-c-programming-2","category-coding","tag-best-c-projects","tag-browsec","tag-c-program-to-open-web-browser","tag-c-programming-for-web-development","tag-c-programming-projects-download","tag-c-programming-projects-for-beginners","tag-c-programming-projects-for-engineering-students","tag-c-programming-projects-for-students","tag-c-programming-projects-pdf","tag-how-to-create-a-web-browser-in-c","tag-how-to-open-a-web-page-in-c","tag-how-to-run-c-program-in-web-browser","tag-make-web-browser-in-c","tag-mini-projects-in-c-with-source-code-and-documentation-free-download","tag-open-url-in-c","tag-open-url-using-c-program","tag-shellexecute","tag-simple-mini-project-in-c","tag-web-browser-in-c"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=24864"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24864\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=24864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=24864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=24864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}