-
Posts
783 -
Joined
-
Last visited
Everything posted by ZulfadlyAshBurn
-
This might help you. You will first need a form to in the main page. index.html <form method="post" action="check.php"> URL: <input type="text" value="" name="url"/></br> Text to find: <input type="text" value="" name="ttf"/> </form> check.php <?php // get data from form $url = $_POST["url"]; $ttf = $_POST["ttf"]; // check if page exist if (file_exists($url)) { // file open and read $fh = fopen($url, 'r'); // find text in file $pos = strpos($fh, $ttf); // check if text if found in source code is false if (pos === false) { // echo that the text cannot be found echo "Url doesnt not contain" . $ttf ; } // else echo that it is successful else { echo "Successful"; } } // if page cannot be found, echo fail else { echo "Url doesnt not contain" . $ttf ; } ?> if it works for you, you may want to donate to me for helping? you should earn quite a fair bit of amount for doing it for your client.
-
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
please mark this topic as solved. it can be found at the bottom of the page . thanks -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
HAHA. no prob. Solving people's script is something i love to do I learn my mistakes from there too -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
try creating a new page with only this codes test.html <div align="center"></br></br></br></br></br></br></br></br> <form method="post" action="check.php" name="register"> <table> <tr> <td><strong><font color="#8A2BE2">noTrebitel:</font></strong></td><td><input type="text" name="username" maxlength="12"/></br></td> </tr> <tr> <td><strong><font color="#8A2BE2">naroLa:</font></strong></td><td> <input type="password" name="pass"/></br></font></td> </tr> <input name="userip" value="<? echo $_SERVER['REMOTE_ADDR']; ?>" type="hidden"/> <tr><td></td><td><div align="right"><input type="submit" value="peGistrirai cE"/></div></td></tr> </table> </form> </div> check.php <?php $ip = $_POST['userip']; $username = $_POST['username']; $pass = $_POST['pass']; include 'condb.php'; $query = "SELECT ip FROM users WHERE ip='$ip'"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)){$match=true;} if (isset($match)){ $msg = "weche si se registriral!"; echo "<div align='center'><font color='#8A2BE2'>$msg</font></div>"; }else{$query = "INSERT INTO users (ip, username, password) VALUES('$ip', '$username', '$pass')"; mysql_query($query) or die(mysql_error()); $msg = "Registrira se uspeshno!"; echo "<div align='center'><font color='#8A2BE2'>$msg</font></div>"; } mysql_close(); ?> if it works means there is something wrong with your server or your full page script. -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
my local server is able to redirect the script. is the something wrong with your local server or full page script? -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
try to use this script for your sendaccinfo.php <?php // get all data from forms $ip = $_POST['userip']; $username = $_POST['username']; $pass = $_POST['pass']; // connect to db include 'condb.php'; // ask mysql $query = "SELECT ip FROM users WHERE ip='$ip'"; // get result from mysql $result = mysql_query($query); while($row = mysql_fetch_assoc($result)){ $match=true; } if (isset($match)){ $msg = "weche si se registriral!"; echo "<div align='center'><font color='#8A2BE2'>$msg</font></div>"; }else{$query = "INSERT INTO users (ip, username, password) VALUES('$ip', '$username', '$pass')"; mysql_query($query) or die(mysql_error()); $msg = "Registrira se uspeshno!"; echo "<div align='center'><font color='#8A2BE2'>$msg</font></div>"; } mysql_close(); ?> -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
your php script is not coded in correct terms. <? $ip = $_POST['userip']; $username = $_POST['username']; $pass = $_POST['pass']; include 'condb.php'; $query = "SELECT ip FROM users WHERE ip='$ip'"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)){$match=true;} if (isset($match)){$msg="weche si se registriral!"; }else{$query = "INSERT INTO users (ip, username, password) VALUES('$ip', '$username', '$pass')"; mysql_query($query) or die(mysql_error()); $msg="Registrira se uspeshno!"; } echo "<div align='center'><font color='#8A2BE2'>$msg</font></div>"; mysql_close(); ?> at the starting of the code change <? to <?php -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
does it redirect you to sendaccinfo.php? i run the code on my local server and it seems to work. is your condb.php configured properly? -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
are you hosting it locally or you are hosting is on a shared web server? -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
can you post more code so that we are able to see more into the problem. please insert login.php so that if we can detect any prob there. -
this is supposed to redirect me to login.php right?
ZulfadlyAshBurn replied to f14000's topic in PHP Coding Help
Yes it should. are you trying to send data over unless you can use a simple hyperlink method. -
Can php code be used to hide the url in the web browser?
ZulfadlyAshBurn replied to jej1216's topic in PHP Coding Help
I agree with what WebStyles replied. You may also want to encode your url such as it wont read the actual path of the domain. create a mdhash then pass it thru post method or get method then also create a session and expire it once used. -
what you need would be window onload. this might help <script> window.onload = function () { // put what you want to execute here. } </script>
-
It should be possible. Try using ajax. Can you give out more info or scripts. its hard for use to predict what you are trying to do.
-
I will be making the script open source/paid version if possible. If you are interested in the outcome, direct message/private message me.
-
Thanks for you help guys but I think i have coded my own script. With the help of the new html 5 video element. i am able to complete 71% of the scripting .
-
I would be making a video streaming website for my school. I would like to code it in php and flash. I will also be needing a playlist which is changeable. Anyone can help me point out how to do it. I wont be using youtube as a platform.
-
I am creating a music player for my school and it is only available online. It is used to stream music produced by students. I would like to disable direct download from the servers. The best i did was to base code and store session but they are still able to download how to disallow them from downloading index.php <?php $nameofdir = "music/"; $domain = $_SERVER['HTTP_HOST']; $dir = opendir($nameofdir); $unique = base64_encode(uniqid()); $_SESSION["uid"] = "$unique"; while (($file = readdir($dir)) !== false) { if (strpos($file, '.mp3') !== false) { $name = str_replace('.mp3', ' ', $file); $files = str_replace(" ", "%20", $file); $id = base64_encode($file); ?> <li><a class="media" href="getaudio.php?uid='<?php echo $unique; ?>'&id='<?php echo $id; ?>"><?php echo $name; ?></a></li> getaudio.php <?php header("Content-type: audio/mp3"); //mp3 contenttype header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 session_start(); $id = base64_decode($_SESSION["uid"]); $uid = base64_decode($_REQUEST["uid"]); $url_id = base64_decode($_REQUEST["id"]); if ( $id == $uid ) { header("Location: music/" .$url_id); } else { echo "Thank you for trying to download."; } ?>
-
nvm, ive got the onready function by jquery. next, is it possible to create your own tags such as <div> <p><h1>
-
So example i have a div <div id="mydiv"></div> i add a data attr to it. <div id="mydiv" data-url="http://google.com"></div> as you can see, the data have a url in it. I would like it to go to google.com if the div is clicked. how do i do it with the javascript currently the code i have <script> function redirect() { var tdiv = getElementbyId('mydiv'); var rurl = tdiv.getAttribute('url'); location.href = rurl ; }
-
one more thing. is it possible if someone clicks the div, the data attr gets called out and the functions then executed.
-
Thanks alot thorpe. Nice working with you guys
-
I am just wondering if it is possible to make your own tags to the input function such as <input type="button" value="Button" mytag="LOL"/> if its possible, tell me how is works.
-
when the user click the link, the music player plays the music. but the link attached to it has extra variable like uniqid and store as a sesion. when the user clicks on the link, it GET file from another page using ajax then uncode the url and get the file name and get the cookie name, once the session name is approved, it will delete the session. but the thing is i have many files. so how do i store cookies for every songs listed. bear in mind that the songs links listed only when page executed by php
-
I would like to secure my files from being downloaded using this code. <?php $unique = md5( uniqid() ); // 32 hex characters ?> but i dont know how to apply it to my files.