eT` Posted February 1, 2010 Author Report Share Posted February 1, 2010 tāmm tagad mēģinu uzrakstīt, piesienies ja kaut kas nav <? if($host == "novamov") { $rand = 1; $urlis = "s".$rand.".novamov.com"; $ch = curl_init('$urlis'); if(curl_getinfo($ch, CURLINFO_HTTP_CODE) == "200") { // kods ar to tagadeejo serveri == $urlis echo "<font color=red>Ja nerāda filmu, pārlādē lapu!</font><br /><br /><iframe style='overflow: hidden; border: 0; width: 580px; height: 430px' src='http://www.novamov.com/embed.php?v=$code' scrolling='no'”></iframe>"; } else { //te vajadzeetu ka tam rand pieskaita 1, bet kaa lai izdara ka atgriezhas uz f-jas saakumu? return; ? $rand = $rand + 1; } } ?> Quote Link to comment Share on other sites More sharing options...
2easy Posted February 1, 2010 Report Share Posted February 1, 2010 (edited) tāmm tagad mēģinu uzrakstīt, piesienies ja kaut kas nav "piesienies" hahaha skaitļus nevajag likt pēdiņās (izņemot dažus very special gadījumus) if(curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200) un kas tas ir par brīnumu? $ch = curl_init('$urlis'); vnk $ch = curl_init($urlis); nevar? $rand = $rand + 1; var uzrakstīt vnk $rand++ q: kaa lai izdara ka atgriezhas uz f-jas saakumu? a: ar ciklu Edited February 1, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
eT` Posted February 1, 2010 Author Report Share Posted February 1, 2010 tammm kods pārveidots pēc taviem ieteikumiem. bet ja nebūs 200 viņš atgriezīsies uz f-jas sākumu? <? if($host == "novamov") { $rand = 1; $urlis = "s".$rand.".novamov.com"; $ch = curl_init($urlis); if(curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200) { // kods ar to tagadeejo serveri == $urlis echo "<font color=red>Ja nerāda filmu, pārlādē lapu!</font><br /><br /><iframe style='overflow: hidden; border: 0; width: 580px; height: 430px' src='http://www.novamov.com/embed.php?v=$code' scrolling='no'”></iframe>"; } else { $rand++; } } ?> Quote Link to comment Share on other sites More sharing options...
2easy Posted February 1, 2010 Report Share Posted February 1, 2010 (edited) omg, tu esi programmētājs vai nē? izdomā, kādas valodas konstrukcijas ir vajadzīgas, lai kods darītu to, ko tu gribi, lai tas dara ;) Edited February 1, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
eT` Posted February 1, 2010 Author Report Share Posted February 1, 2010 piedod, kaut kā pēc negulētas nakts nedomājas. nu emm cikli nav mana stiprā puse :D šāds for risinājums neder? manā galvā bija ok :D for($i=1;$i<9;$i++) { if(curl == 200) { break; //shite vajadzētu izvadīt to video } } Quote Link to comment Share on other sites More sharing options...
2easy Posted February 1, 2010 Report Share Posted February 1, 2010 kamēr nepamēģināsi, tikmēr nezināsi ^^ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.