PHP Classes

PHP Ask.fm: Retrieve the questions asked to users of Ask.fm

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 163 All time: 8,933 This week: 206Up
Version License PHP version Categories
askfm 1.4Artistic License5PHP 5, Web services, Data types
Description 

Author

This class can retrieve the questions asked to users of Ask.fm.

It sends the HTTP request the Ask.fm site to retrieve the RSS feed of the questions asked to a given user.

The class returns an array of question details that include the question, the answer the date of the question and its page URL on the Ask.fm site.

In Italian:

Questa classe vi permetterà di prelevare le domande di un utente di ask.fm, il social noto come Domanda e rispondi.

Picture of Pasquale Garofalo
Name: Pasquale Garofalo <contact>
Classes: 1 package by
Country: Italy Italy

 

Example

<?php

   
/**
    *** @Esempio : Esempio dell'utilizzo della classe ask.class.php
    *** @Autore : Pasquale Garofalo
    *** @Versione: 1.3
    *** @Facebook: https://www.facebook.com/garofalop2012
    **/

require_once('ask.class.php');

$ask = new Ask();

$ask->setUser("GarofaloPasquale");

$count = $ask->countContent();

for(
$i = 0; $i < $count; $i++){
   
$post = $ask->getSingleContent($i);
   
    echo
"<div style='border-bottom:1px solid #cecece;'>
        Domanda: "
.$post['title']." <br />
        Risposta: "
.$post['description']." <br />
    </div>"
;
   
}

if(
$ask->userExist()){
   
   
// Utente esistente / User Exist
   
   
for($i = 0; $i < $count; $i++){
       
$post = $ask->getSingleContent($i);
       
        echo
"<div style='border-bottom:1px solid #cecece;'>
            Domanda: "
.$post['title']." <br />
            Risposta: "
.$post['description']." <br />
            <a target='_blank' href='"
.$post['link']."'>Link</a>
        </div>"
;
    }
   
}else{
    echo
"Utente inesistente";
}



?>


  Files folder image Files (2)  
File Role Description
Plain text file ask.class.php Class Classe di ask.fm
Accessible without login Plain text file esempio.php Example Esempio dell'uso della classe

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:163
This week:0
All time:8,933
This week:206Up