Search Results

Search found 3 results on 1 pages for 'sineverba'.

Page 1/1 | 1 

  • Simple website with a GPL V3 Framework

    - by sineverba
    I write web-based software and simple website ("Home", "Who we are", "Contact"). For a simple website I'm using a covered GPL v3 framework. The user surf the website, send an email, take info, etc. I repeat: simple website, not a Joomla or Wordpress. 1) Will the website be covered with the GPL? I don't modify the framework. I'm using his classes in other classes... (OOP). 2) For the point 1, if yes, do I need to add (e.g. in the footer) name of framework and his link? 3) I must permit download of entire website to study code (nothing that a programmer has interest in)? E.g. placing it in Github? 4) If 2 is NO, how you can "understand" that we use that framework? In effect no php lines are exposed to the browser... You cannot understand that when you push "Send email" the site is calling $this->send($email). If you write me an email "Are you using XXX framework"? I can answer NO.

    Read the article

  • PHP OOP: Am i following right way?

    - by sineverba
    I'm learning OOP (PHP). I've realized my own CRUD Class, that performs some kind of queries SQL. Btw, a Gasoline asked us to realize a smart, simple web-app where he can update prices of his gasoline (gasoline, diesel, lpg) and via an API i could recall them and display in his site. So, I did create a new Class Gasoline but it perform some methods of CRUD Class public function getPrezzoBenzina($id) { $prezzo_benzina = $this->distributore->sql('SELECT prezzo_benzina FROM prezzi WHERE id = '.$id); return $prezzo_benzina } And so on (code is pseudocode, just to explain). I could perform all my code only with help of Crud Class... without necessity of Class Gasoline. So, what I'm missing about OOP? Where am I wrong?

    Read the article

  • Paypal IPN: how get the POSTs from this class?

    - by sineverba
    I'm using this Class <?php class paypalIPN { //sandbox: private $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; //live site: //private $paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; private $data = null; public function __construct() { $this->data = new stdClass; } public function isa_dispute() { //is it some sort of dispute. return $this->data->txn_type == "new_case"; } public function validate() { // parse the paypal URL $response = ""; $url_parsed = parse_url($this->paypal_url); // generate the post string from the _POST vars aswell as load the // _POST vars into an arry so we can play with them from the calling // script. $post_string = ''; foreach ($_POST as $field=>$value) { $this->data->$field = $value; $post_string .= $field.'='.urlencode(stripslashes($value)).'&'; } $post_string.="cmd=_notify-validate"; // append ipn command $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->paypal_url); //curl_setopt($ch, CURLOPT_VERBOSE, 1); //keep the peer and server verification on, recommended //(can switch off if getting errors, turn to false) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string); $response = curl_exec($ch); if (curl_errno($ch)) { die("Curl Error: " . curl_errno($ch) . ": " . curl_error($ch)); } curl_close($ch); return $response; if (preg_match("/VERIFIED/", $response)) { // Valid IPN transaction. return $this->data; } else { return false; } } } ANd i recall in this mode: public function get_ipn() { $ipn = new paypalIPN(); $result = $ipn->validate(); $logger = new Log('/error.log'); $logger->write(print_r($result)); } But I obtain only "VERIFIED" or "1" (whitout or with the print_r function). I just tried also to return directly the raw curl response with return $response; or return $this->response; or also return $this->parse_string; but everytime I receive only "1" or "VERIFIED"....... Thank you very much

    Read the article

1