0

enter image description here

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 https://drive.google.com/file/d/0B_Or1EdQ3IkSWkltbFZpdlIzVVk/edit?usp=sharing

1 Answer 1

2

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")});

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.