PHP warning

file_get_contents(https://samp.znu.ac.ir/web/activity/data?type=conferences&national_code=1380005582&begin_date=&end_date=): failed to open stream: HTTP request failed!

/var/www/vhosts/znuweb/protected/views/members/list-articles.php(694)

682     
683 }//if ($count!=0)
684 }//if (!empty($new2->getName()) && count($new->children()) != 0) 
685         else
686 $msg=1;            
687 
688 //////////////////////////////////////////////////////////////////////
689 /////////////////////////////////////////////////////////////////////                 
690 
691 
692 $url2="https://samp.znu.ac.ir/web/activity/data?type=conferences&national_code=".$model->national_code."&begin_date=&end_date=";
693 
694 $xmlfile2 = file_get_contents($url2);
695 //$xmlfile2 = html_entity_decode($xmlfile2, ENT_QUOTES, "utf-8");
696 $xmlfile2 = str_replace("&", '&', $xmlfile2);
697 //$xmlfile = preg_replace('#&(?=[a-z_0-9]+=)#', '&', $xmlfile);
698 $xmlfile2 = str_replace('MY_AND', '&', $xmlfile2); 
699 $xmlfile2 = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlfile2);
700 
701 /*
702 $xmlfile2 = str_replace("'", ''', $xmlfile2);
703 $xmlfile2 = str_replace('"', '"', $xmlfile2);
704 //$xmlfile = str_replace('>', '>', $xmlfile);
705 //$xmlfile = str_replace('<', '&lt;', $xmlfile);
706 */

Stack Trace

#0
+
 /var/www/vhosts/znuweb/protected/views/members/list-articles.php(694): file_get_contents("https://samp.znu.ac.ir/web/activity/data?type=conferences&nation...")
689 /////////////////////////////////////////////////////////////////////                 
690 
691 
692 $url2="https://samp.znu.ac.ir/web/activity/data?type=conferences&national_code=".$model->national_code."&begin_date=&end_date=";
693 
694 $xmlfile2 = file_get_contents($url2);
695 //$xmlfile2 = html_entity_decode($xmlfile2, ENT_QUOTES, "utf-8");
696 $xmlfile2 = str_replace("&", '&amp;', $xmlfile2);
697 //$xmlfile = preg_replace('#&(?=[a-z_0-9]+=)#', '&amp;', $xmlfile);
698 $xmlfile2 = str_replace('MY_AND', '&amp;', $xmlfile2); 
699 $xmlfile2 = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlfile2);
#4
+
 /var/www/vhosts/znuweb/protected/views/members/view_pages_en.php(496): CController->renderPartial("list-articles", array("model" => ZuTeachers, "lang" => "en"))
491         
492         
493 if ($pg=='list-articles' and $model->articlefromsamp==0)
494   $this->renderPartial($pg, array('model'=>$model, 'model2'=>$model2, 'model3'=>$model3,'lang'=>$language));
495 else if ($pg=='list-articles' and $model->articlefromsamp==1)    
496   $this->renderPartial($pg, array('model'=>$model,'lang'=>$language));
497 else
498  $this->renderPartial($pg, array('model'=>$model, 'model2'=>$model2,'lang'=>$language)); 
499  
500  ?> 
501 
#9
+
 /var/www/vhosts/znuweb/protected/controllers/MembersController.php(1400): CController->render("view_pages_en", array("pg" => "list-articles", "model" => ZuTeachers, "lang" => "en"))
1395          $this->render('view_pages_fa',array('pg'=>'list-articles','model'=>$model,'model2'=>$resultArtconf,'model3'=>$resultArtjournal,'lang'=>$lang));
1396 }
1397 else if ($model->articlefromsamp==1)
1398 {
1399          if($lang=="en")
1400          $this->render('view_pages_en',array('pg'=>'list-articles','model'=>$model,'lang'=>$lang));
1401          else
1402          $this->render('view_pages_fa',array('pg'=>'list-articles','model'=>$model,'lang'=>$lang));
1403 }
1404     
1405 else
2025-01-19 03:19:58 Apache Yii Framework/1.1.14