Tracking Web Page using java,JS,Jquery,AJAX - javascript

I am fresher in this tracking web page topic.
I want to be write code for tracking web page and if is any changes have occurred in that page then it is able to automatic mail sending to my mail id.
Is it possible?
If yes then which programming language is best for it?
would you please give me suggestion that which technology I have used for this?
Which are prerequisites for it?
How do I've start and from where?
Give me basic example also.

Which programming languages do you already know? Take the one you know the best!
Just to give an idea how to approach it:
use a Library similar to jQuery (jquery, jsoup, beautifulsoup, etc…) to extract specific page elements
save the element's content somewhere (database, file)
run the script periodically
compare saved content with fresh content from the website
send a mail if a change happened

Related

How can I add a button that sends an email with a PDF attached?

I don't really know if it is possible but I am creating a catalog in indesign using in5 plugin which converts the indesign in HTML using javascript and jQuery. In each page of that catalog have 6 products.
How can I make a button that, when clicked, opens the email client app (for example, Outlook) with the PDF of the specs and technical drawings of the product attached?
Please help me or point me in the right way.
Thank You
Honestly, if you want options on who you send the email to and what it contains,
there's no magic HTML button that's going to just send an email for you.
If you plan on using JavaScript you should probably learn how to use NodeJS and the Nodemailer module.
This will allow you to set up a server with which to create and send emails from on your site, not just open a pre-existing client.
Here's what you might want to see to get started.
https://youtu.be/nF9g1825mwk
Then when it comes to Nodemailer use this one because the last video is outdated.
https://www.youtube.com/watch?v=h7wH7aEb8Ok
I don't know if this is quite accurate, but attempt this:
Make the button, so that it has a hyper reference(href) to the link to the app . You can use a container to send a message.
You can include a link to the pdf.

How to set a licence-type authorization to a JS file?

I know this is not the right "use" of Javascript. But my company wants to give access to a Javascript file to only particular client (for example clients who subscribe to a special plan). For exemple, if we provide a script to a client and 5 users can access to it, how can i authorize the access to only 5 users and not more?
Because if we don't restrain the access, the client can take the script and give it to anyone (and we will loose a lot of money, because we are selling our knowledge, and our knowledge is this script)
For now the only way to secure our code is by using NodeJS, so the client can't see the script because he only see the generated html page. But we can have the case which the whole server is hosted by the client. So anyone can access to the script, and we want to prevent this case.
So, is there any way to setup a server licence-like for a web application?
(I already know about JS minimizer, and obfuscator, but this is not the kind of things I m looking for)
Thanks in advance
JavaScript is a client side script language, that means it's hard to protect your knowledge.
Even if you minimize or obfuscate your script, people can send it to others and it'll still work.
Inspired by video protecting, I have an idea to protect your knowledge.
You can insert a log script that send logs with your custom's id. If your custom share the script to others, you can know it.
Another way is to insert a fragment of useless code, which can track the custom id, like:
var userId = zo1vjiw73;
Then if you see some other website are using your code, you can easily know who shared the script.

Using a web proxy to modify the html response coming back from a website

Background:
I am looking for a way to insert a <script> tag into a webpage for which I do not have access to the server-side source code.
Question:
My organization uses Blue Coat ProxySG for our web proxy solution and I am wondering if there is a way to have the proxy modify the html coming back from the site host before it passes it down to the client. Does anyone know if this can be done?
Not possible from the Blue Coat ProxySG with current SGOS code.
You can create custom exception html pages on the ProxySG, if that is more of what you are trying to accomplish. So, if you are unable to access the server, you can have the ProxySG serve the exception page. This is not modifying the html from the site host, but providing it's own html which is customized to your needs.
Marcus, I believe a load-balancer with advanced configuration from a vendor such as F5 has the capability to modify layer-7 packets to insert/remove and modify various things.

Get parameter from another page using javascript?

I have a wordpress site, and i'm not a php developer and not very eager to start either so I'm avoiding it like the plague, but I do have a requirement that requires a little bit of extra coding. I need to:
go to a different website,
download that page,
check for a certain phrase,
if phrase exists, extract a link from that page
and if link is returned I need to show that link on my wordpress site.
Currently, I have an asp.net page that does this and i'm hosting that page in an iframe on my wordpress site. but i'd like to do it without an iframe.
Question is, is there anyway for javascript to go to a different page (my asp.net page) and get a parameter (link) from it. If link is provided i will show certain content on wordpress site.
Or can javascript download a text file from the server? problem with that is i need a trigger to update the text file.
Any advice is appreciated.
Thanks.
What you should understand is that by "avoiding [PHP] like the plague" you're inadvertently avoiding the proper way of doing things. Javascript is a client-side language, and PHP is a server-side language. By asserting that you only want the load on the client's end (the kind of logic involved in what you want to do isn't exactly lightweight), you can potentially end up with a VERY slow webpage.
Not to mention, this type of situation is analogous to using a hammer to do a backhoe's job.
Either way, to answer your question, yes. You can use the jQuery Load method in tandem with Javascript's Match method.
What you should TRY to do, however, is make a CURL request using PHP, and then cache the page on your server. By doing this, you will limit the number of calls to a given page, and optimize load times.
Please consider the second option, even as an attempt in good practice. Good luck.
Use ajax and connect to a different page (on your server) which is written in server-sided language (like asp.net, as you said), that connects to the remote website.
More about Ajax

What is a good way to get feedback from a user on a website?

I'm working on a website for my county's fair. I want to allow my visitors to be able to ask me questions by inputing their name, email, and comment in a form like this one:
http://lincolnfair.net/images/feedback.JPG
So I guess my real question is how can I send an email (using JavaScript/JQuery) to myself with all these fields as the main body of the email.
You should use a server-side script (e.g. PHP, Python, Perl, etc.). With pure HTML and JavaScript, you can use a mailto form, but this will be very unreliable.
I will suggest uservoice.com , it can integrate with your site nicely, a much more powerful user feedback system, without spending time to code the feedback system yourself
As others have indicated, this is a typical task that can be solved easily using a server-side language. Javascript and jQuery aren't the right tool for this particular problem. To point you in the right direction, use method="post" for your form, and you can access users' submission in a PHP file by examining the $_POST variable. If a <input> element in your form has name="email" in your email, you can access that variable in PHP as $_POST['email']. If you're interested in a PHP solution, look at the documentation for the mail() function.
Jukka has a good guide on How to write HTML forms. It should give you everything you need to produce something functional.
You need a server side component, nothing client side will be a reasonable substitute for that. JavaScript won't help for a form as simple as the one you describe.
The most reliable way will be to use a server side script in your preferred language. The specifics of how to do this are probably outside the scope of this question and would depend upon your language of choice.
Your other option is to set the action of the form as a mailto: which will use the visitors preferred email client to send the email. This will work but is really bad and relies on the viewer having an email client installed and configured.
you can find out more information about the mailto option at http://www.chami.com/tips/internet/010597I.html
Another good option would be a third party site such as www.wufoo.com which handle all of the email business server side for you on their own servers. I believe Wufoo even allow you to embed their forms within your own site.
If you want it to be available on every page, you might want to consider using jQuery and the UI Dialog plugin. You could set it up so that the default feedback is a mailto which gets replaced using javascript with a link that brings up a jQuery Dialog containing the fields you want to collect. This could be submitted back to your server via AJAX and delivered to you via email from the server.
EDIT: Since you've edited your question to indicate a server-side only solution, the above seems somewhat out of context. With others, I would agree that using some client-side code to actually send the email is the way to go (as alluded to above). I think it's preferable to use your own server for this, but I'm sure that you can find many "form to email" services. I would avoid these, unless you want your email addresses harvested for use in SPAM. You might also be able to use a signed applet or ActiveX control for this, again I would not go down that route. As indicated above, I would let the browser handle the interface, but my server handle the sending of the email.
I am not sure i understand your question completely, but if all you want to do is conduct a survey over email, i don't think you need to use jQuery or HTML.
A very simple way to do it is to use the 'Forms' feature in Google Docs.

Categories

Resources