Swear Posted September 4, 2008 Report Share Posted September 4, 2008 (edited) Man nesanāk uztaisit lai radas output ja $statuss piemeram ir online lai echo paradas noradits teksts Kods: <? $niks = 'blablabla'; $statuss = join('', file("http://mystatus.skype.com/$niks.txt")); $output = if $statuss == "Online" { //Šī rinda nestrada ka vajg echo "<b><body background-color:#C0C0C0>Statuss: $niks ir piesledzies skype!"; } elseif ($statuss == "Away" ) { echo ('<b><body background-color:#C0C0C0>Projaam. </body></b>');} //te visi parejie statusi ; echo ($output); ?> Saprotu ka tas ir ļoti vienkārši bet es tikai vēl mācos... Edited September 4, 2008 by Swear Link to comment Share on other sites More sharing options...
andrisp Posted September 4, 2008 Report Share Posted September 4, 2008 o! Link to comment Share on other sites More sharing options...
Swear Posted September 4, 2008 Author Report Share Posted September 4, 2008 o! netišam iepostoju nepabeigtu postu tapec ieliku - ... tagad izlaboju ka bij domats! Link to comment Share on other sites More sharing options...
martins256 Posted September 4, 2008 Report Share Posted September 4, 2008 http://www.w3schools.com/php/php_if_else.asp file un join nebūs arī tā labākā izvēle P.S. manu statusu tajā lapā rāda kļūdaini :( Link to comment Share on other sites More sharing options...
codez Posted September 4, 2008 Report Share Posted September 4, 2008 To statusu rāda tikai tad, ja tu settingos uzliec, ka atļauj rādīt! Laikam tā! Link to comment Share on other sites More sharing options...
andrisp Posted September 4, 2008 Report Share Posted September 4, 2008 (edited) Nez, man arī tas http://mystatus.skype.com/ neatgriež pareizi. Par kodu: $statuses = array( 'Online' => 'lala', 'Offline' => 'desa', //utt ) $status = file_get_contents(...); if (!empty($status) && isset($statuses[$status])) { echo $statuses[$status]; } else { echo 'nevaru noteikt :('; } Edited September 4, 2008 by andrisp Link to comment Share on other sites More sharing options...
Paulinjsh Posted September 4, 2008 Report Share Posted September 4, 2008 man ar kkā to statusu rāda pavisam aplamu! Link to comment Share on other sites More sharing options...
marcis Posted September 5, 2008 Report Share Posted September 5, 2008 Jā, iekš skype ir jāieliek atsevišķš ķeksis, lai atļautu rādīt tavu statusu interneta vietnēs. P.S. Izmanto bildītes, tad nebūs jādomā par datu ievākšanas metodi un apstrādi :) Link to comment Share on other sites More sharing options...
p4F Posted September 5, 2008 Report Share Posted September 5, 2008 <? $niks = 'nick'; $statuss = join('', file("http://mystatus.skype.com/$niks.txt")); if ($statuss == "Online") { //Šī rinda nestrada ka vajg $output = "<b><body background-color:#C0C0C0>Statuss: $niks ir piesledzies skype!"; }elseif ($statuss == "Away" ) { $output = '<b><body background-color:#C0C0C0>Projaam.</body></b>'; } echo $output; ?> man stradaa Link to comment Share on other sites More sharing options...
Swear Posted September 5, 2008 Author Report Share Posted September 5, 2008 paldies p4F! tieši tas ko man vaidzēja. Link to comment Share on other sites More sharing options...
andrisp Posted September 5, 2008 Report Share Posted September 5, 2008 marcis, ar visu ķeksi nerāda pareizi. Link to comment Share on other sites More sharing options...
Pentiums Posted September 5, 2008 Report Share Posted September 5, 2008 iemetu ķeksi uzreiz visu parādīja Link to comment Share on other sites More sharing options...
Recommended Posts