webpage

Create temporary link for download

狂风中的少年 提交于 2019-11-28 06:39:23
I use ASP.NET I need to give user temporary link for downloading file from server. It should be a temporary link (page), which is available for a short time (12 hours for example). How can I generate this link (or temporary web page with link)? Here's a reasonably complete example. First a function to create a short hex string using a secret salt plus an expiry time: public static string MakeExpiryHash(DateTime expiry) { const string salt = "some random bytes"; byte[] bytes = Encoding.UTF8.GetBytes(salt + expiry.ToString("s")); using (var sha = System.Security.Cryptography.SHA1.Create())

How might I obtain a Snapshot or Thumbnail of a web page using PHP?

拈花ヽ惹草 提交于 2019-11-28 04:58:16
问题 I need to create Snapshots / Thumbshots / Site preview a-site.com. There are some site as thumbshot.org that meets with I need. But I do not want to use an external service, not to depend on others for my project (What would happen if they close the site?) For this reason, I am looking for some project to let me do this. Any idea? 回答1: On windows you can use GD's imagegrabwindow() function. Edit: The help page actually shows you how to grab a screenshot from IE. 回答2: There isn't anything in

replace image with a video embeded

不打扰是莪最后的温柔 提交于 2019-11-28 04:32:55
问题 Hi I'm trying to modify a web page so that it loads faster. Since I have some videos embeded (blip.tv but can change it to youtube if it helps) I was wondering if you could load an image where the video should be and on click replace the image with the video and start playing (without reloading the whole page). I think I've seen this before, but can't find it anywhere anymore! right now the code to embed I use is: <object data="http://blip.tv/play/gYMo_vAmAA" type="application/x-shockwave

Open webpage and parse it using JavaScript

拜拜、爱过 提交于 2019-11-28 04:09:17
I know JavaScript can open a link in a new window but is it possible to open a webpage without opening it in a window or displaying it to the user? What I want to do is parse that webpage for some text and use it as variables. Is this possible without any help from server side languages? If so, please send me in a direction I can achieve this. Thanks all You can use an XMLHttpRequest object to do this. Here's a simple example var req = new XMLHttpRequest(); req.open('GET', 'http://www.mydomain.com/', false); req.send(null); if(req.status == 200) dump(req.responseText); Once loaded, you can

What's the best “file format” for saving complete web pages (images, etc.) in a single archive? [closed]

被刻印的时光 ゝ 提交于 2019-11-28 03:49:30
I'm working on a project which stores single images and text files in one place, like a time capsule. Now, most every project can be saved as one file, like DOC, PPT, and ODF. But complete web pages can't -- they're saved as a separate HTML file and data folder. I want to save a web page in a single archive, and while there are several solutions, there's no "standard". Which is the best format for HTML archives? Microsoft has MHTML -- basically a file encoded exactly as a MIME HTML email message. It's already based on an existing standard, and MHTML as its own was proposed as rfc2557 . This is

Bootstrap 3 - jumbotron background image effect

孤者浪人 提交于 2019-11-28 02:41:50
Hi I'm trying to build a site with a jumbotron with a background image, which in itself is not hard: HTML: <div class="jumbotron"> ... </div> CSS: (which lies in my custom css file and is loaded after all over css). .jumbotron { margin-bottom: 0px; background-image: url(../img/jumbotronbackground.jpg); background-position: 0% 25%; background-size: cover; background-repeat: no-repeat; color: white; text-shadow: black 0.3em 0.3em 0.3em; } Now this creates a jumbotron with a background image, but I would like to get it to do an effect which I find hard to describe but is seen on this webpage here

iphone uiwebview download complete page with CSS and Images

放肆的年华 提交于 2019-11-27 22:31:19
In my app there's a uiwebview that loads a url. I am using the following line to save the HTML of the page loaded locally to be able to view it offline. NSString* html=[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('html')[0].innerHTML"] The problem is only the HTML of the document that gets saved, I want to save also the images and the CSS along with the HTML so that the user see the page as if he is online. just like "save web page complete" or something like that, that we used to in the browsers. appreciate your help. There is no easy way. Regex the HTML

How can i get content of web-page

霸气de小男生 提交于 2019-11-27 22:21:24
i'm trying to get web-page data in string that than i could parse it. I didn't found any methods in qwebview, qurl and another. Could you help me? Linux, C++, Qt. EDIT: Thanks for help. Code is working, but some pages after downloading have broken charset. I tried something like this to repair it: QNetworkRequest *request = new QNetworkRequest(QUrl("http://ru.wiktionary.org/wiki/bovo")); request->setRawHeader( "User-Agent", "Mozilla/5.0 (X11; U; Linux i686 (x86_64); " "en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1" ); request->setRawHeader( "Accept-Charset", "win1251,utf-8;q=0.7,*;q=0.7" )

Adding a Progress Dialog in a webview

筅森魡賤 提交于 2019-11-27 21:31:27
I have been trying to incorporate a progress dialog into my app when pages are loading in the webview so there isn't just a blank white screen. I know this question is posted everywhere but I can't seem to figure out anything that works for me. I am new to programming and working with android so any information would be helpful. Below is the code that I currently have now. With the onPageStarted I am getting a compile error for Bitmap and I'm not sure what the problem is. Thanks. public class Grades extends Activity{ @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate

link to Print in a webpage

江枫思渺然 提交于 2019-11-27 17:13:40
问题 Can I put a link on my webpage to the Printer ? To go to the same page like Ctrl-P goes in Firefox, IE. Thank you. 回答1: <a href="javascript:if(window.print)window.print()">Print</a> 回答2: Add this to your link: onclick="window.print();" 来源: https://stackoverflow.com/questions/771966/link-to-print-in-a-webpage