Jump to content
php.lv forumi

novamov.com


eT`

Recommended Posts

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;
  }
}
?>

Link to comment
Share on other sites

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 by 2easy
Link to comment
Share on other sites

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++;
  }
}
?>

Link to comment
Share on other sites

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
 }
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...