Parser Title, Description, Keywords with Google Docs
Hello to all! Google Docs is an interesting and extremely multifunctional technology that allows you to work not only with documents and spreadsheets.
In today’s lesson, we will consider the possibility of using Google Docs for parsing Title, Description and Keywords from any number of sites – completely free and fast enough. Yes, you can use ready-made developments for this, but … why not make your own combine? 😉 Continue reading Parser Title, Description, Keywords using Google Docs?→
When planning a trip for the weekend the whole family thought that songs from children’s cartoons would be very pleasant on the road. Well, is it really bad to sing something like:
? 🙂 No sooner said than done! An interesting resource for donating songs to my iPod was the http://savok.name/ site stages of history. The choice of songs is not bad, but the possibility of batch downloading on the site is not provided 🙁
Zennoposter comes to the rescue – I wrote about it earlier, and yet I repeat – a completely unique program that allows you to automate everything that happens in the browser. So the task is simple: 1. Find the link to the file 2. Activate it 3. Save the file to the computer 4. We pass to the first point
Looking at the file saving structure on the specified site, it is clear that it uses a static parameter: http://savok.name/uploads/music/, but the file name has a numerical value. Given that our task is to preserve the entire database of songs – this only makes our task easier.
The scheme of the resulting project is presented below. As you can see, at the very beginning of the project, we set the initial value of the variable responsible for the growth of the numbering of the requested file. Thanks to this, we can download the entire database from the first file. Important : I did not add verification of the existence of the link, because it is lazy. Therefore, in the event of a dead link, the program will save an empty file on your computer.
So, we will consider the general scheme of the bootloader in more detail: 1. Set the initial value of the variable. 2. From their created list, where we put the static value of the link http://savok.name/uploads/music/ we get this link in the form of a variable. 3. Specify the address on the disk where we will save the downloaded files 4. We form a GET request in the form: {-Variable.file -} {- Variable.count -}. Mp3, where {-Variable.file-} is a variable that has the value http://savok.name/uploads/music /, and {-Variable.count-} is the counter value, mp3 is the file extension that does not change. 5. A notification about saving the file is issued. 6. Increase the counter value by 1. 7. We return to paragraph 1.
Thus, our program accesses the link http://savok.name/uploads/music/1.mp3, saves it, increases the counter by one, then saves the second file and then on and on. In fact, the scheme is quite flexible. Nothing prevents us from parsing the original file name, and loading it 🙂
That’s all. You can download the project itself via the link 😉
Faced just the task of restricting access to a specific page on a site created on WordPress. Those. the task seems to be simple: if the user has not logged in, he cannot access information on a specific page. But in fact, without picking in the code, implementing it is not so simple.
However – this is Worpdress! Despite the openness of the code, the platform enjoys well-deserved popularity – below is a slice of the popularity of CMS-systems in Runet, on the basis of which the leadership of WordPress is quite obvious:
It is thanks to the openness of the system with the help of plug-ins for inexperienced users in coding that it becomes possible to customize the engine of their own mind. You can solve almost any problem and the problem I mentioned above – restricting access to the page – was perfectly solved with the help of the plugin WP-Members .
The plugin installation process is standard: 1. Download the plug-in to your hard drive 2. Upload via FTP to the server in the folder /wp-content/plugins/ 3. Activate the plugin in the control panel.
Or – go to the link: http://yoursite/wp-admin/plugin-install.php and enter the name of the required plug-in in the search bar: WP-Members, after which we install and activate it.
Immediately after activating the plugin, you will be redirected to the settings page, where you can specify the rules for its use. You can restrict access to both pages and posts on the site. An interesting feature of the plugin is the ability to create an announcement of the record – i.e. an unauthorized user can see the fragment of the record that you highlighted, but get to know the full text only after the registration or verification procedure.
In addition – in the plugin control panel you can specify the address of the user registration and authorization page – a very convenient option if you suddenly want to create an individualized page of this procedure that is different from the standard one in WordPress.
Sometimes you have to add banner rotator to html sites that is not tied to any network, which is as simple as possible to manage and configure. The code that I present below is very convenient – it is very simple, and should not raise questions.
However – if questions still arise – my mail oleksiy@lavrynenko.com is always at your service! 🙂
<div align="center" class="block">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin -->
var how_many_ads = 3; //number of banners being sorted
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="Link"; //the address to which the user lands after clicking on the banner
alt="Site name";
banner="Address-from-load-banner"; //address of the banner image itself
width="279";
height="233";
}
if (ad==2) {
url="Links"; //the address to which the user lands after clicking on the banner
alt="Site name";
banner="Address-from-load-banner"; //address of the banner image itself
width="279";
height="233";
}
if (ad==3) {
url="Links"; //the address to which the user lands after clicking on the banner
alt="Site name";
banner="Address-from-load-banner"; //address of the banner image itself
document.write('alt="' + alt + '" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End --></SCRIPT>
</p>
</div>
As you can see from the presented code – the main load lies on a script that generates a random number in a given range (its size is adjusted manually – the code is working on 12 banners). After generating a random number, a given banner is selected and displayed in a layer.
An example of how the code works is available using the link (each time this page is updated, the picture will change randomly – currently there are links to three pictures in the code).