Maj Librairies
This commit is contained in:
parent
0ff7d32399
commit
c4f431af75
1028
library/Metier/Partenaires/MLiens.php
Normal file
1028
library/Metier/Partenaires/MLiens.php
Normal file
File diff suppressed because it is too large
Load Diff
1626
library/SphinxSearch/sphinxapi-0.9.9.php
Normal file
1626
library/SphinxSearch/sphinxapi-0.9.9.php
Normal file
File diff suppressed because it is too large
Load Diff
1810
library/SphinxSearch/sphinxapi-2.1.5.php
Normal file
1810
library/SphinxSearch/sphinxapi-2.1.5.php
Normal file
File diff suppressed because it is too large
Load Diff
1840
library/SphinxSearch/sphinxapi-2.2.10.php
Normal file
1840
library/SphinxSearch/sphinxapi-2.2.10.php
Normal file
File diff suppressed because it is too large
Load Diff
1832
library/SphinxSearch/sphinxapi-2.2.6.php
Normal file
1832
library/SphinxSearch/sphinxapi-2.2.6.php
Normal file
File diff suppressed because it is too large
Load Diff
1832
library/SphinxSearch/sphinxapi-2.2.7.php
Normal file
1832
library/SphinxSearch/sphinxapi-2.2.7.php
Normal file
File diff suppressed because it is too large
Load Diff
1832
library/SphinxSearch/sphinxapi-2.2.9.php
Normal file
1832
library/SphinxSearch/sphinxapi-2.2.9.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
/** Parse une page Html et retourne son contenu dans un tableau :
|
||||
** "code" => Code réponse Serveur
|
||||
@ -6,8 +6,8 @@
|
||||
** "body" => Page HTML
|
||||
**/
|
||||
function parse_response($this_response) {
|
||||
|
||||
|
||||
|
||||
|
||||
// Split response into header and body sections
|
||||
list($response_headers, $response_body) = explode("\r\n\r\n", $this_response, 2);
|
||||
$response_header_lines = explode("\r\n", $response_headers);
|
||||
@ -22,7 +22,7 @@ function parse_response($this_response) {
|
||||
foreach($response_header_lines as $header_line)
|
||||
{
|
||||
list($header,$value) = explode(': ', $header_line, 2);
|
||||
|
||||
|
||||
if ($header=='Set-cookie' && substr($value,0,5)=='RMID=' && $nbRMID<5)//{
|
||||
$nbRMID++;
|
||||
// echo ("Je gicle le RMID n°$nbRMID\r\n");}
|
||||
@ -57,7 +57,7 @@ function getUrl($url, $strCookies='', $postData='', $referer='', $debug=false, $
|
||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||
if ($proxy<>'') curl_setopt($ch, CURLOPT_PROXY, $proxy);
|
||||
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'username:password'); // Pas nécessaire en authentification NT
|
||||
|
||||
|
||||
if (((int)$timeout)<>0) {
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (int)$timeout);
|
||||
@ -77,7 +77,7 @@ function receiveResponse($curlHandle,$xmldata)
|
||||
$this->size += $this->length;
|
||||
return $this->length;
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (preg_match('/^https/i',$url))
|
||||
@ -131,7 +131,7 @@ if ($nbRetry==0) {
|
||||
$response=array('code' =>408, 'header' =>array('curl_errno'=>curl_errno($ch),'curl_error'=>curl_error($ch)), 'body' =>'Connexion impossible au site du partenaire/Timeout');
|
||||
else
|
||||
$response=array('code' =>400, 'header' =>array('curl_errno'=>curl_errno($ch),'curl_error'=>curl_error($ch)), 'body' =>'Erreur Curl : ' . curl_error($ch));
|
||||
} else
|
||||
} else
|
||||
$response = parse_response($page);
|
||||
} else {
|
||||
$numTry=0;
|
||||
@ -149,14 +149,14 @@ if ($nbRetry==0) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($debug){
|
||||
$url2=str_replace('http://', '', $url);
|
||||
$url2=str_replace('/', '_', $url2);
|
||||
$url2=str_replace('?', '(param)', $url2);
|
||||
$url2=str_replace('&', '(et)', $url2);
|
||||
|
||||
|
||||
|
||||
$fp=fopen('/tmp/curl-'. date('Ymd-His') .'-'. microtime_float(true) .'-'. $url2 . '.html', 'a');
|
||||
fwrite($fp, $url."\r\n");
|
||||
fwrite($fp, $page);
|
||||
@ -181,7 +181,7 @@ function getTextInHtml($pageHtml, $strToFind, $strDeb, $strEnd, $include_strDeb=
|
||||
if (!$include_strDeb)
|
||||
$deb2+=strlen($strDeb);
|
||||
$s_temp = substr($pageHtml, $deb2, ($fin-$deb2));
|
||||
|
||||
|
||||
if ($ltrim) $s_temp=ltrim($s_temp);
|
||||
if ($rtrim) $s_temp=rtrim($s_temp);
|
||||
|
||||
@ -190,7 +190,7 @@ function getTextInHtml($pageHtml, $strToFind, $strDeb, $strEnd, $include_strDeb=
|
||||
//$a_temp = explode('" class="basic">', $s_temp);
|
||||
$tabUrl[$nbOccTrouve]=$s_temp;
|
||||
$nbOccTrouve++;
|
||||
|
||||
|
||||
if ($nbOcc==$nbOccTrouve) {
|
||||
// echo "j'ai trouvé le nb demandé, je sort\r\n";
|
||||
break;
|
||||
@ -236,14 +236,14 @@ function getPdfInfo($f){
|
||||
//echo '5'.EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$tabInfo['pdfSize']=filesize($f);
|
||||
$tabInfo['nbPages']=0+$nbPages;
|
||||
//$tabInfo['debugBuffer']=$prev_buffer;
|
||||
return $tabInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function simpleWhois($domain, $tdl, $debug=false) {
|
||||
// Fonction de traitement
|
||||
// -----------------------------------------------
|
||||
@ -254,7 +254,7 @@ function simpleWhois($domain, $tdl, $debug=false) {
|
||||
// 4 => Erreur, il faut spécifier une chaine à rechercher (regexp)
|
||||
// 5 => Erreur, la requête retournée était vide
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
// Informations spécifiques aux extensions
|
||||
$info = array(
|
||||
'fr' => array(
|
||||
@ -271,7 +271,7 @@ function simpleWhois($domain, $tdl, $debug=false) {
|
||||
'regexp' => 'No[s]*match[s]*for'
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
// Initialisation de la sortie
|
||||
$output = '';
|
||||
// Initialisation de la requête
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require_once 'framework/common/mysql.php';
|
||||
require_once 'framework/common/strings.php';
|
||||
//include_once(FWK_PATH.'common/dates.php');
|
||||
require_once 'framework/common/dates.php';
|
||||
|
||||
define ('REP_TEMP', LOG_PATH);
|
||||
// Environnement : DEV ou PRD
|
||||
|
Loading…
Reference in New Issue
Block a user