Click here to Skip to main content
15,886,774 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: recursive array search [modified] Pin
nhsal693-May-10 4:11
nhsal693-May-10 4:11 
Questionhow to open pdf files in browser Pin
umeshdaiya27-Apr-10 23:35
umeshdaiya27-Apr-10 23:35 
AnswerRe: how to open pdf files in browser PinPopular
Peter_in_278029-Apr-10 20:41
professionalPeter_in_278029-Apr-10 20:41 
AnswerRe: how to open pdf files in browser Pin
Peace ON29-Apr-10 21:10
Peace ON29-Apr-10 21:10 
GeneralRe: how to open pdf files in browser Pin
Peter_in_27801-May-10 16:08
professionalPeter_in_27801-May-10 16:08 
AnswerRe: how to open pdf files in browser Pin
Peace ON2-May-10 23:20
Peace ON2-May-10 23:20 
AnswerRe: how to open pdf files in browser Pin
cristminix13-May-10 12:07
cristminix13-May-10 12:07 
QuestionDepriciated Function in PHP 5.3 - ereg & eregi Pin
sangeeta200926-Apr-10 2:55
sangeeta200926-Apr-10 2:55 
Friends , I have a code which uses Depreciated functions:
I have Marked that code BOLD, please help me if you could provide alternative statements to them ... like through PREG..

Please Help..

Sigh | :sigh:
if (ereg("HTTP/[0-9.]+ (([0-9])[0-9]{2})", $answer, $regs)) {
$httpcode = $regs[2];
full_httpcode = $regs[1];
if ($httpcode <> 2 && $httpcode <> 3) {
$status['state'] = "Unreachable: http $full_httpcode";
$linkstate = "Unreachable";
}
}






if (ereg("Location: *([^\n\r ]+)", $answer, $regs) && $httpcode == 3 && $full_httpcode != 302) {
$status['path'] = $regs[1];
$status['state'] = "Relocation: http $full_httpcode";
fclose($fp);
return $status;
}


if (eregi("Last-Modified: *([a-z0-9,: ]+)", $answer, $regs)) {
$status['date'] = $regs[1];
}

if (eregi("Content-Type:", $answer)) {
$content = $answer;
$answer = '';
break;
}



if (eregi("Content-Type: *([a-z/.-]*)", $content, $regs)) {
if ($regs[1] == 'text/html' || $regs[1] == 'text/' || $regs[1] == 'text/plain') {
$status['content'] = 'text';
$status['state'] = 'ok';
} else if ($regs[1] == 'application/pdf' && $index_pdf == 1) {
$status['content'] = 'pdf';
$status['state'] = 'ok';
} else if (($regs[1] == 'application/msword' || $regs[1] == 'application/vnd.ms-word') && $index_doc == 1) {
$status['content'] = 'doc';
$status['state'] = 'ok';
} else if (($regs[1] == 'application/excel' || $regs[1] == 'application/vnd.ms-excel') && $index_xls == 1) {
$status['content'] = 'xls';
$status['state'] = 'ok';
} else if (($regs[1] == 'application/mspowerpoint' || $regs[1] == 'application/vnd.ms-powerpoint') && $index_ppt == 1) {
$status['content'] = 'ppt';
$status['state'] = 'ok';
} else {
$status['state'] = "Not text or html";
}



Please HELP me soon ..please REPLY!!! Cry | :((
AnswerRe: Depriciated Function in PHP 5.3 - ereg & eregi Pin
Luc Pattyn26-Apr-10 3:15
sitebuilderLuc Pattyn26-Apr-10 3:15 
GeneralRe: Depriciated Function in PHP 5.3 - ereg & eregi Pin
sangeeta200926-Apr-10 3:30
sangeeta200926-Apr-10 3:30 
GeneralRe: Depriciated Function in PHP 5.3 - ereg & eregi Pin
Luc Pattyn26-Apr-10 3:55
sitebuilderLuc Pattyn26-Apr-10 3:55 
AnswerRe: Depriciated Function in PHP 5.3 - ereg & eregi Pin
cristminix13-May-10 12:14
cristminix13-May-10 12:14 
Questionwhich is Best php framework to use in any general project ? Pin
Peace ON25-Apr-10 20:36
Peace ON25-Apr-10 20:36 
AnswerRe: which is Best php framework to use in any general project ? Pin
User 171649225-Apr-10 21:46
professionalUser 171649225-Apr-10 21:46 
GeneralRe: which is Best php framework to use in any general project ? Pin
Peace ON29-Apr-10 1:26
Peace ON29-Apr-10 1:26 
GeneralRe: which is Best php framework to use in any general project ? Pin
mdusyl15-May-10 8:00
mdusyl15-May-10 8:00 
AnswerRe: which is Best php framework to use in any general project ? Pin
whatrevolution23-Jun-10 0:21
whatrevolution23-Jun-10 0:21 
Questiongetting information from the url Pin
SRJ9224-Apr-10 15:23
SRJ9224-Apr-10 15:23 
AnswerRe: getting information from the url Pin
Luc Pattyn24-Apr-10 15:32
sitebuilderLuc Pattyn24-Apr-10 15:32 
Questioninstalling Zorine OS on virtualbox?? Pin
AmbiguousName24-Apr-10 5:10
AmbiguousName24-Apr-10 5:10 
AnswerRe: installing Zorine OS on virtualbox?? Pin
LloydA11124-Apr-10 5:53
LloydA11124-Apr-10 5:53 
Questionphp website with parameters Pin
MacIntyre22-Apr-10 13:03
MacIntyre22-Apr-10 13:03 
AnswerRe: php website with parameters Pin
Dr.Walt Fair, PE23-Apr-10 16:25
professionalDr.Walt Fair, PE23-Apr-10 16:25 
GeneralRe: php website with parameters Pin
MacIntyre23-Apr-10 19:26
MacIntyre23-Apr-10 19:26 
GeneralRe: php website with parameters Pin
Dr.Walt Fair, PE24-Apr-10 6:29
professionalDr.Walt Fair, PE24-Apr-10 6:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.