Reputation: 1222
It is screenshot of my website http://www.example.com/wp-admin . All I want to do is to get number of posts only i.e. this "34" number from the website, which I have to use it somewhere else. What I am thinking is to parse the whole website by URL and search for these div or class . But I don't know how to do this or weather it is possible or not. If any one can give some code snippet of this. JQuery preferred.
PS: URL for better quality image http://goo.gl/d1F8Na
Upvotes: 0
Views: 211
Reputation: 7019
is this http://www.example.com/wp-admin your website? If yes you need to allow access from the server to access this website via jquery ajax.
If it is not your domain, most probably you cant use jquery as jquery ajax may not have access to it. I generally make a chrome plugin for such things. Using the chrome plugin get this number value and then you can use $.get or $.post to sent these variables to your website.
The code you will need to use in your chrome plugin will look something like this.
var myval = $('tr.first td.first.b.b-posts a[href="edit.php"]').text
$.post('www.mydomain.com/getvariables.php',{data:myval}, function(){alert("successfully transfered")});
Upvotes: 2