Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. what results do you get when you echo $sql; after that line?
  2. Welcome, remember to click solved (bottom left)
  3. Well done taith
  4. so it works fine.. but doesn't do what you want!.. OK whats the problem error etc ? what part have to added that doesn't work.. your to lazy to give details and i'm to lazy to read your whole script..
  5. i'm sorry i don't understand.. your logic!
  6. looks OK but i would increase it to more, as the value is measured in bytes, also 'post_max_size' must be taken into account take a look at data handling Edit: sounds good
  7. i think what your looking for is $_GET ie index.php?page=1&id=3 $_GET['page']; //returns 1 $_GET['id']; //returns 3
  8. error type 1 Now we know the reason it fails.. maybe try <?php ini_set("upload_max_filesize", 10000000); ?>
  9. try if($_FILES['user_file'][name] == NULL && $message == NULL){ $message = 'Please enter a file to upload.';} as a note please use the code tags when posting script
  10. i'll need to see the code really, i'm kinda working half blind..
  11. <?PHP should be <?php as for line 11, woudn't thats be in the "... all other head stuff here ..."
  12. the basic is here <?php $ID = "st0001"; if(substr($ID, 0, 2) == "st") { //goto student } ?>
  13. and questions are asked like this
  14. your need to add the same thing but to the name of the file field ie <input name="uploadedfile" type="file" /> duplicate if($_POST['fname'] == NULL && $message == NULL){ $message = 'Please enter your first name.';}" and change fname to whatever the type file was ie: uploadedfile if($_POST['uploadedfile'] == NULL && $message == NULL){ $message = 'Please enter your first name.';}" of course change the message hope that helps
  15. First question is do you have a broadcast licence ? 2nd is the site needs to link to your PC, also i think something like RealPlayer server or QuickTimer Streamer would be better as their are designed for that either way your need to bridge the gap from Video to Stream and that isn't a script its a local hosted application.. so simplely NO (not as far as i am aware without other applications)
  16. instead of bumping over and over.. just create a very simple test script and then add to it until the problem occures, then work from their.. heres a quick test one to try <?php echo "debug<br />POST"; print_r($_POST); echo "<br />Files"; print_r($_FILES); echo "<br />end debug"; ?> <form enctype="multipart/form-data" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="1024000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> <?php if(isset($_POST['submit'])) { set_time_limit(); $target_path = "uploads/"; $name = $_FILES['uploadedfile']['name']; $tmpname = $_FILES['uploadedfile']['tmp_name']; $target_path = $target_path.$name; if(move_uploaded_file($tmpname, $target_path)) { echo "The file $name has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } } die; ?> heres an output Oh it failed "[error] => 2" but with [MAX_FILE_SIZE] => 1024, so i increased that to 1024000, try again and.
  17. if Check Incoming Link is red then system couldn't find the link and of course set $MyURL to your url <?php $query = "SELECT * FROM links"; $MyURL = 'http://en.www.mozilla.com/en/firefox/about/'; $result = mysql_query($query); if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_row($result)) { echo "<a target='_blank' href='{$row['4']}'>{$row['3']}</a><br>Description: {$row['6']}<br><br>"; if($isadmin) { $siteContents = file_get_contents($row['5']); $is_there = strpos(strtolower($siteContents),strtolower($MyURL)); $syscheck ($is_there !== false)?"":" color='#FF0000'"; echo "[ <a href=editlink&linkid={$row['0']}>Edit Link</a> 1"; echo "<a href=deletelinks&linkid={$row['0']}>Delete Link</a> l "; echo "<a target='_blank' href={$row['5']}><font$syscheck>Check Incoming Link</font></a> ]"; echo "<br><br>"; } } }else{ echo 'No links found!'; } ?> EDIT: you may need to change $siteContents = file_get_contents($row['5']); to $siteContents = file_get_contents($row['4']); as i wasn't sure which one was the other sites URL
  18. ahhh i get you try this <?php $testURL = 'http://en.www.mozilla.com/en/firefox/about/'; //link to check $siteContents = file_get_contents("http://www.google.co.uk/firefox?client=firefox-a&rls=org.mozilla:en-GB:official"); //link to check $is_there = strpos(strtolower($siteContents),strtolower($testURL)); if ($is_there !== false) echo "Found it @ offset $is_there!\n"; ?>
  19. OK as your on PHP4 try this <?php $testText = '<html><body>my link is in this page. <a href="http://www.MYLINK.com/">Mobile Reviews</a></body></html>'; $testURL = 'http://www.THEIRLINK.co.uk'; $is_there = strpos(strtolower($testText),strtolower($testURL)); if ($is_there !== false) echo "Found it @ offset $is_there!\n"; ?>
  20. remember to click solved (bottom left) i added an example!
  21. mysql_fetch_row($result) will go to the next row.. and return false if theirs no more rows hence the while loop ie $row = mysql_fetch_row($result) //row1 $row = mysql_fetch_row($result) //row2 $row = mysql_fetch_row($result) //row3
  22. try function addtoPlaylist() { array_push($_SESSION['song'],$_GET['path']); }
  23. and WildBugs Script ? how did that not work ? (of course replacing strpos with stripos)
  24. do a var_dump($_SESSION['song']);
  25. Echo taith.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.