User Statistics in php - php

I am using Codeigniter for my current project.
The peoject is looks like a social platform,so i want to display users data on user admin panel.
I have the following types of domains for users.
http://site.com/page_name/
so page_name is a page of a particular user,so when that user logged in to his control panel i want to show the usage statistics of page_name to him.
On Cpanel we can see so many LOG programs ,is there any plugin available to integrate this on codeigniter/php ?
i heared about Awstats ,can i use it on my case ? or how they saving the data on the server,if they are using a database then i can easily get the data from datbase.
or any other methods ? custom things ?
All suggestions and opinions are welcome.
Thank you.
Update : I want statistics for every pages on my project
they are not in subdomains its looks like site.com/page_name .
If i can use Google Analatycs API ,then how can i track these pages ??

You could use Piwik and inserting the link into a view.
Piwik is like google analystics, but on your server. Thats what i like, nobody else can get access to your stats.

Building custom analytics isn't hard (unless you want graphs, but this is fairly easy to do with jqplot - http://www.jqplot.com/).
You could just autoload a library that would populate a db table (through a model) with current_url() or uri_string(), and then pull the stats out for each user.

Related

Access Shares from a Company on LinkedIn via PHP from Wordpress

I am trying to retrieve the shares of a company on linkedIn (basically just read the stream, as is easily possible on twitter) to display them on a Wordpress website in a custom HTML/CSS styling, so I only need the data. This should happen just in the backend, so no user interaction (as login etc.) should be necessary.[The end result is simply a slider that aggregates the latest social media posts, like twitter, facebook & linkedin. Works for Twitter & FB so far.]
After many hours of research it seems to me that this is not directly possible with an entirely server-side solution?
Can someone direct me if it is possible to do so? There are many php linkedin libs, but all of them seem to direct to some sort of login from which the user is redirected back? (maybe I am mistaken here).
Any help is greatly appreciated!
Take a look if they offer public rss feeds, thats the most simple way. When they offer only protected then search for developer acces from where you can get api access.

Facebook like button and OAuth Access

I am connecting to the Facebook API using HybridAuth on the server side (backend is written in PHP). This is for a SaaS publishing application that is hosted on our servers. I understand the mechanics of OAuth and that once I accquire the appropriate permissions from the user, I can write and read from the Open Graph API, which in theory will allow me to do almost anything.
The problem is that I would like to use some of Facebook's social plugins. In particular, I would like to implement the like button so that it automatically appears for each blog post, article and page.
The problem is that the like button and the various Facebook plugins require an app_id. I would prefer not requiring users to add the developer app to their account and creating an app to get an app_id as it can be a confusing process for non-developers.
Is there anyway we can create or retrieve an app_id from open graph (which we can store and use to generate the like buttons and other facebook widgets)?
With the migrations, I understand that each liked URL will not have it's own page. Once the user clicks a like button on your site, he automatically likes your page. However, let's say I have a page called http://www.mystore.com/products/some-awesome-product and there are other similiar pages, all with a like button. Is it possible that when clicking like, the user automatically likes our Facebook page, but when an item is published in their news feed for the like, the URL links to that specific product? Effectively, is there a way for users to like multiple pages from my site?
Update: It looks like we can generate app_ids programmatically with the create application API in the legacy REST API. However, this does not seem to be an option with the graph API.
Seems like we cannot programatically create an app_id for an account. This is not an issue, as we will just create a small guide to guide our users through creating an app and submitting the app_id to us using a form. Not perfect, but should be easy to implement.
As for URLs, liking something will not automatically like your Facebook page. If href is blank, the current page will be liked. If you set your facebook page in the href parameter, then your facebook page will be liked.

PHP posting on page wall

I have a website where users can post jobs for free. How can I link these posts to a facebook page about this website? I don't want the users to login to fb.
At this moment I post them to twitter and then using selective tweets to post them on my page. But selective tweets is not able to post logo's specific for that job.
I created a fb app. Did not select anything just gave it a name and got an appID and appSecret. I dont now what to select in "Select how your app integrates with Facebook". Becouse it is not a mobile app and it is not a website with fb login.
Kind regards.
you can use share on facebook facility of facebook ,from http://developer.facebook.com.
you can easily add this to your website.
have fun!
You can do this easily via MYSQL and PHP, depending on how your current site is setup. What i would do is store the jobs into a separate table while saving, like this
(table) Facebook
pageid //numerical value
header //job title
message //job description
So that you can use it for the next part.
Create an application via Facebook and give it authentication to users and your Facebook page.
by adding this application to your page you can then call something like :
$facebook->set_user($user, $session_key);
$facebook->api_client->stream_publish($item['header'], $item['message'], $item['pageid']);
Using your keys from facebook.
Then you can run a Cron that updates every x minutes, and after it has posted it, in an array, you can clear the table for the next row of jobs.
Let me know where you are on this and ill try to help as much as possible.

Twitter API grabbing/caching/parsing multiple streams

I need some thoughts in this :) I think i might be trying to do the impossible.
I’ve got a website with a lot of company profiles (300+).
I want to place a stream on every profile page, and allow the owner of that profile page to enter some keywords in the backend with the keywords they want the stream to display.
1 thing would be to do this with javascript on the fly, on every profile page.
But, since I want to use the combination of every profile stream on the frontpage and parse images in a tweet (yfrog, plixi) i thought it would be best to cache them into a mysql db, and work from there with PHP. (Maybe SEO advantage over Javascript? )
Is this even possible ?
My first bet was to make a REST call to the api with the keywords from all company profiles ,put them to the DB and store which keyword would be connected to that tweet.
Any thoughts on this ?
You could use the Streaming API with a track filter, that would allow you to capture all statuses matching the keywords your profile owners select. By default, you're limited to 400 keywords, but could ask Twitter to increase you're access level (they list a few levels in the documentation).

Joomla unified logins for forum and a custom made php sub-site

I'm building a site with Joomla where a forum should exist amongst other things. But also I plan to develop a custom made functionality (diary-like) with a php inserts (it really works, for example with jumi). The problem is that I suppose nobody will understand if the forum and this sub-site will have separated logins. I'd use an existing forum authentication for my code also, but I don't like the idea that the login will look like forum-only login. I see there are bridges exist (like JFusion), but should I choose one particular forum extension if I plan to use a particular bridge extension? And are bridges easy to access with custom-made php code?
If this is for a Joomla 1.5 website, you will want to create a user plugin that will log the user into your custom site as they log into Joomla. Take a look at plugins/user/example.php for an example user plugin. The onLoginUser function will be called just after someone successfully logs into Joomla. At this point, you'll have all of their data in the $user array that's passed into the function. You should be able to use this information to create a bridge into your external PHP application.

Categories