Jump to content

JoeF

Members
  • Posts

    14
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://oob.uk.to

Profile Information

  • Gender
    Not Telling
  • Location
    Scotland

JoeF's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey, I was wondering if anyone knew the best way of copying a remote image (via a url), so that it can be resized (i know how to do that bit), and only the thumbnail being stored. Cheers Joe
  2. But the problem is, there is only 5 results in the database at the moment, and they are all about a paragraph each. And it worked perfectly on the other server, but now it doesn't on this server when the script hasn't been changed at all either.
  3. Hey, I had my full text search working previously, although recently we moved to a different server, now whenever I search I get zero results, even though there is data in the database and we haven't changed the script. Server version: 4.1.22 Here's the query I'm using: $query2="SELECT * , MATCH(`data`, `keydate`) AGAINST('$q') AS score FROM `dataindex` WHERE `userid`='$userid' AND MATCH(`data`, `keydate`) AGAINST('$q') ORDER BY score DESC "; This returns 0 results, however this: $query2="SELECT * , MATCH(`data`, `keydate`) AGAINST('$q') AS score FROM `dataindex`ORDER BY score DESC "; DOES return results, but they are not ordered correctly and aren't as relevant than what I had with the script on the old server. I have the FULL TEXT index setup in the db on the columns data and keydate. Note: NO errors are ever returned from these. Cheers, Hope someone can help Joe
  4. Hey, im using this: [code] $get="SELECT * FROM `songs` WHERE `title` LIKE  '%$query%'"; $result = mysql_query($get) or die(mysql_error()); while ($row =mysql_fetch_array($result))         { $title=$row['title']; $id=$row['id']; echo "<a href='play.php?id=$id'>$title</a><br>"; }[/code] To search for results that match the title. But instead of that, its returning every row on that table. Ive used this before and it usually works fine, also in phpmyadmin when i use its built in search it works fine also on the table, so its not something wrong with the table itself. Has to be something with this code, but i cant see what. Anyone any ideas? Thanks very much..
  5. Hey guys, Im working on a spider/crawler for a specialist search engine. Im trying to get my script to load the contents of a directory into a variable. Similar to how you woud use: [code]$html = implode('', file($url)) ;[/code] to load html of a remote page into a variable. However when $url is a directory eg: http://www.vobe.frihost.net/testing/ You can go to view source in your browser and see the html, but it just hangs when using file() to view it, obviously cos its not a file. Im guessing the browser is generating the html for that directory. What i need to know is how to let php get that html so i can pharse the links out of the directory. Thanks Hope someone can help!
  6. thanks shoz, that got rid of that error. Although it is now throwing up another, its saying "Can't find FULLTEXT index matching the column list". Although on my table in the db, the title and description fields both have fulltext index's on them. Any ideas? Thanks
  7. because where statements dont give accurate enough results. What im using is a feature called Fulltext boolean search. it is very accurate, and returns relevant results based on complicated algorithms and it allows far more control over the search. You can read more about it here: http://www.joedolson.com/boolean-query-in-mysql.php The match() against() parts work fine on their own. Its the AS score onwards that im having some problems with. Hope someone can help. Cheers.
  8. Hey there, im implementing a fulltext search. It all works fine until i try to get it to order them by relevance. Ive read the tutorial here on php freaks that says this should work: [code]SELECT * FROM `index` WHERE MATCH(title,description) AGAINST('$squery' IN BOOLEAN MODE) AS score FROM `index` WHERE MATCH(title,description) AGAINST('$squery' IN BOOLEAN MODE) ORDER BY score DESC LIMIT $from, $max_results[/code] But i get this error returned: [code]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS score FROM `index` WHERE MATCH(title,description) AGAINST('test' IN BOOLEAN M' at line 2[/code] Something to do with the 'AS' bit, there isnt a score field in the database, but in the tutorials ive read it doesnt mention that their should be one. I was assuming that the query assigns the relvance score to that variable so you can pull it out later and order them. Any help would be great, if you need more info just let me know! Thanks
  9. [url=http://oob.uk.to]http://oob.uk.to[/url] Just launched version 2 of the site.  Need some feedback. Thanks Joe
  10. Hey, ive used this piece of code before and it worked perfectly fine, but now that ive moved this site to a different folder im getting permission errors. Its an image upload, it uploads ok, but im getting a permission error when i try and copy it from the tmp file and rename it to it new location. This worked before but now its not: Heres the code: [code]copy($_FILES['imagefile']['tmp_name'], "../img/thumbs/".$filen.".jpg") or die ("could not copy"); [/code] the "../img/thumbs/".$filen.".jpg" part is my auto name gen bit, it works fine. And i get this error: [quote]Warning: copy(../img/thumbs/oo34m2CSfU.jpg): failed to open stream: Permission denied in /home/slammer/public_html/oob/jellybeans/process.php on line 30 could not copy[/quote] ive tried changing the permissions of the folders, but that doesnt help.. Hope someone can help.
  11. Hey, Please have a look at [a href=\"http://oobnews.uk.to\" target=\"_blank\"]http://oobnews.uk.to[/a] This is my side project ive been working on for a few days. Simply it is a news website, updated every 15minutes with all the latest news from round the world. Updated 24/7, 365 days of the year. Yes thats true. This is due to it being fully automated. It finds which articles are the best from many different sources and displays the most relavent. All image selection and resizing is done automatically too. Its quite simple at the moment. Ive got a few features im working on, such as being able to have a page for each story that will display similar stories on other news websites, yes thats similar to google news but thats not all that will be displayed. Where possible links to audio, video and picture gallerys related to that story will also be displayed. I can add sections too, so for example the upcoming world cup, im planning to add a section dedicated to that. Ive only been working on it for a few days, so there are still some issues that need working out. Sometimes the page renders look a bit messed up, this is usually fixed the next time the news is updated, so jsut refresh after 15mins or so n all should be fixed. At time of writing the entertainment section is currently down, although by the time you read this is should hopefully be back up. Please comment :) Joe EDIT: Forgot to mention that there is an issue in IE where theres a size shift of the page from the main page to the sub sections. It works pefectly fine in Firefox, only happens in IE. I shall be working to fix this tomorrow after ive had some sleep. Thanks. Joe.
  12. hey, If you wanna go back and have another look ive re-done the design of it, well mostly the colours, and tightened it all up abit. I think its a big improvement, a lot more professional, i didnt really spend much time on the design before this stage. What do you think about it? I dunno whats wrong with it cutting off at the top. Ive ran tests with browsers cam, and it only seemed to cut it off in netscape, and was fine in firefox, everyone i know use's firefox n it works fine for them. Check again with this new layout it might be fine now hopefully. Trying to get to the bottom of the problem. Thanks guys Joe
  13. hey, ive read your replys, and those of some posts i made on other critique forums. And i dont understand why you all think about it so negatively. Everyone else off of forums says it looks good and theres no problems :S When i view it, and many others the contrast is fine, the background isnt too dark, and the red text [b]is[/b] consistent, its a single style sheet, why wouldnt it be? And the navigation is fine and simple to use. Could you please post a send me a screenshot of what you are seeing? Thanks
  14. [a href=\"http://oob.uk.to\" target=\"_blank\"]Check us out here[/a] Hey there! We only just opened up the user registration about 1 hour ago. So we want some opinions of what you all think! Thanks Joe
×
×
  • 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.