hello everyone, i am having a problem about my php code which tells that it cannot open a stream from function file(), and says 404 not found, true, but i already have filtered it but the error really comes out, but when i enter a valid id number, it produces no errors(ofcourse). What help am I going to need in solving this problem? To make it more understandable, I will give an example of the error message. (I am using XAMPP, and I still haven't uploaded it to any webhosting sites, this php file is still on my desktop. Nevermind the database connection and data insertion, it will still work without it.
"
Warning: file(http://www3.uic.edu.ph/images/100x102/1242343.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp\htdocs\kevinyuwow\naix.php on line 24"
Thank you in advance,
Kevin.
<html>
<title>Hello Everybody!</title>
<body bgcolor="black">
<center>
<font color="pink"><b>ENTER YOUR ID NUMBER:</b></font><br>
<form name="hello" action="naix.php" method="post">
<input type="text" name="idnumUIC"><br>
<input type="submit" value="Enter!">
</form>
</center>
<?php
if(isset($_POST["idnumUIC"]))
{
$url = "http://www3.uic.edu.ph/images/100x102/";
$id = $_POST["idnumUIC"].".jpg";
$complete = $url.$id;
if(file($complete))
{
echo "<br> <br><center><font color=red><b>OMG THIS MUST BE YOU?!?!?!?!?!?</b></font><br><br>";
/* $con = mysql_connect("localhost", "root", "");
mysql_select_db("test", $con);
$x = 0;
$query = "insert into idnum_tbl (idnum_order, real_deal)";
$gt = $_POST["idnumUIC"];
$query2 = "values ('$x++','$gt')";
$com = $query.$query2;
mysql_query($com, $con); */
for($x = 1; $x <= 30; $x++)
{
echo "<img src=$complete>";
if($x % 10 == 0)
{
echo "<br>";
}
}
mysql_close($con);
}
else
{
echo "<center><font color=white><b>File doesn't exist. Try harder =)</b></font></center>";
}
}
?>
</body>
</html>