Jump to content

Arkane

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Arkane's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok. pressed the submit button while getting up to tend to kids, so have missed the modify window. Sorry folks The problem I have is with opening the file at the start. I have used $dbhandle = sqlite_open('C:\Users\Steve\AppData\Roaming\XBMC\userdata\Database\MyVideos34.db', 0666, $sqliteerror); however this gives me an error of "Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a database in C:\xampp\htdocs\XBMC.php on line 2" I have spoken to XBMC devs, and the file is an SQLite3 file, but is not encrypted. Can anyone tell me how to open this. I have confirmed that SQLite3 is installed in the XAMPP installation using phpinfo() SQLite3 module version 0.7-dev SQLite Library 3.7.7.1
  2. Hey guys, I've got a media player that writes to an SQLite database (XBMC), and due to file changes I need to make a mass edit to this. I can't do it in the program itself, so I figured I'd use a local XAMPP installation to edit it using PHP. I've done PHP stuff before, but not for quite a while and I'm a little rusty. Sadly, my problem has come straight at the start of the
  3. Thanks again mjdamato. I tried that, but I got an error first off. It seems you've missed a slight bit in the middle. The line "$gg = ($rgb >> & 0xFF;" should be "$gg = ($rgb >> & 0xFF; Anyway, it does greyscale, except that I lose my transparent background with it, which turns completely black. Other than that, the rest of it looks very good, and so I think it would work perfectly for complete images. Cheers man.
  4. Hey mjdamato, cheers for the reply. I want the image to be coloured on the left, and greyed on the right. The link you left was just pointing to this thread. I've not had any experience converting the images to greyscale myself, I've generally just used imagesfilter($img, IMG_FILTER_GRAYSCALE) to do it for me, but then I have no idea about resources that that may use in comparison. I guess if I do it with my own function then it's probably the same as adding the filter, so would be less resource intensive to only do half. I just have a tendency to prefer built ins. Spoilt really.
  5. I'm trying to create a script that will automatically dull out a percentage of an image, specified via a GET value. I have the image created using imagecopy() and it is working fine, but I'm not sure how to get it to set GRAYSCALE to the percentage specified. I considered copying the image twice, copying the first x% to one resource, and the remaining % to the other, greyscaling it, then recombining the two, but I wasn't entirely sure how to, and thought there may be a better way to do it anyway. Can anyone help me out, or point me towards the correct solution. Much appreciated.
  6. OK, thank you very much, I had no idea how to do that, it'll be perfect. Cheers mate
  7. Hey, thanks for the reply. Unfortunately, I made a major mistake in my description. what I actually want is the ability to do this from a radio box, not a checkbox. I tried adapting the method given, but obviously it wouldn't work properly as the radios all have the same name. Is there any way to change this to work with radios?
  8. Hey guys, I've been asked to make a sort of admin system for a mysql database. Theres very little to it, but for some reason it is demanded of me. What I have just now is 2 checkboxs, and the record name displaying. The checkboxes are written from the php, and have values of "approve" and "delete", while the names of both are $sqlresult->id What I need is for them to process at the other end, so that every id with a value of "approve" will be updated, and "delete" will be deleted from the records, but I don't really have a clue how to do it. Can anyone give any pointers? Cheers
  9. thank you Salathe. that worked perfectly.
  10. Hey, I've made a script to get data from another page which uses DOMDocument. It works, but only if all of the tags exist. For instance, I use $var = $dom->getElementById('ctl00_mainContent_identityStrip_lblRank')->nodeValue; The problem is, that the page I'm taking it from doesn't always have the element with that id. I'm checking for multiple on the page, but some are there and some arent, but the script breaks if they aren't all there. How can I check if the node exists, and then only create the variable if it does?
  11. thanks for getting back so quickly. I've tried that, but I'm not having any luck with it. Basically my entire code: <?php $url = "http://www.advanscene.com/html/Releases/dbrelpsp.php?id=1908"; $raw = file_get_contents($url); preg_match('~<td class=\"*+\">Serial Code</td>\s<td class=\"*+\">([0-9\-]+)</td>~', $raw, $matches); print_r($matches); ?> I'm intending to take about 4 different pieces from the page and write them to variables, but obviously getting nowhere. Even trying the bit you gave me displays nothing but "Array ( )". What am i missing?
  12. Hey, I'm trying to write a script to get data off of another site (with admins approval) but I'm having a bit of a problem to take the actual data. I'm trying to use preg_match to find the data I need, but just cant get the thing to work for anything more complicated that telling me if there is a t in test. <td class="reltdd">Serial Code</td> <td class="reltdv">5445-9826</td> This is the html that i am trying to scrape. theres more, but its all the same pretty much. What I'm looking to get is the '5445-9826' but since the td is a class that is referred to multiple times, the only thing unique to the date is the 'Serial Code' text. I've gotten the site info via file_get_contents() and its all in the one variable - $raw . I've tried preg_match("/<td class="reltdd">(.*)</td>/", $html, $matches); echo $matches; but it had no return whatsoever. i have also echoed $html so I know it got the data correctly. I know that what I have there should only return 'Serial Code' but sinceI can't even get that to work I have no chance with the rest. Any help would be appreciated.
  13. HEy, I'm trying to write a script to get data off of another site (with admins approval) but I'm having a bit of a problem to take the actual data. I'm trying to use preg_match to find the data I need, but just cant get the thing to work for anything more complicated that telling me if there is a t in test. <td class="reltdd">Serial Code</td> <td class="reltdv">5445-9826</td> This is the html that i am trying to scrape. theres more, but its all the same pretty much. What I'm looking to get is the '5445-9826' but since the td is a class that is referred to multiple times, the only thing unique to the date is the 'Serial Code' text. I've gotten the site info via file_get_contents() and its all in the one variable - $raw . I've tried preg_match("/<td class="reltdd">(.*)</td>/", $html, $matches); echo $matches; but it had no return whatsoever. i have also echoed $html so I know it got the data correctly. I know that what I have there should only return 'Serial Code' but sinceI can't even get that to work I have no chance with the rest. Any help would be appreciated.
  14. Thanks for that Kat. I've tied it, and it does indeed work, at least for the rudimentary trials I've tried so far. Just to be anuisance though, I'm looking t set it in the PH t cnnect to the file. It's something which I'm going to be putting on a remote computer which I don't have the ODBC thingy access to in control panel. Cheers anyways.
×
×
  • 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.