Jump to content

EGONick

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

About EGONick

  • Birthday 08/28/1988

Contact Methods

  • Website URL
    http://www.cergo.co.uk

Profile Information

  • Gender
    Male
  • Location
    UK, Manchester

EGONick's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello there. I'm in need of some help. I'm trying to develop a function which searches a page and replaces a custom HTML tag with a content section from the database. I'm having a problem getting the var name of the content item to fetch it from the database. When it comes to expressions I'm pants. Here's my function up to now but, the variable fetched from the tag isn't passed through. function parse_content($content) { return preg_replace("/<content var=(.*)>/", get_object("content", '${1}'), $content); } Anyone got any idea's? Many thanks.
  2. Yeah because I'm sure the last time it worked fine in IE. http://www.urbanchicdirect.com/index.php thanks
  3. I've been using this technique for a while and I didn't realise that it doesn't work in IE7 or possibly any IE. #navigation li .left { width: 10px; height: 36px; float: left; } #navigation li:hover .left { background: url('./images/template/navigation_active_left.png') no-repeat; width: 10px; height: 36px; float: left; } #navigation li .bg { float: left; height: 21px; padding: 15px 0 0 0; } #navigation li:hover .bg { background: url('./images/template/navigation_active_background.png'); color: #6b6b6a; } #navigation .right { float: left; width: 10px; height: 36px; } #navigation li:hover .right { background: url('./images/template/navigation_active_right.png') no-repeat; } This is my script which works fine in all other browsers, it simply allows me to have links of any width but still allow hover changes. I've checked for fixes for the IE problem and found a fix but it doesn't seem to work and isn't direct at this sort of problem. Thanks, Nick.
  4. As long as the data exists in the database try this: <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); mysql_query("update players set hostname=$hostname where id=$stat[id]"); $badisp = mysql_fetch_array(mysql_query("select * from badisp")); if ($hostname == $badisp['isp']){ print "Invalid login MOFO."; } ?>
  5. The actual zip functions allow you to read the contents of the zip file. <?php $zip = zip_open($zipfile); while ($zip_entry = zip_read($zip)) { zip_entry_open($zip, $zip_entry); $name = zip_entry_name($zip_entry); $handle = fopen($name, "w"); fwrite($handle, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)), zip_entry_filesize($zip_entry)); fclose($handle); // use $name to insert in to database. zip_entry_close($zip_entry); } zip_close($zip); ?> Presuming you aren't after uploading a zip file with directories and you can add a directory before the fopen directory.
  6. You'd have to edit your ZipArchive class to return the files from the extractTo function allowing you to use them to do with as you wish,
  7. I'm currently developing a PHP licensing system which is currently working fine but at present it's checking the license data each time a page is loading and as I'm using the fsockopen function to send and receive the license data from the server it's taking quite a while to do so. I've thought a few alternatives such as cron jobs to update the license and requesting the license at login but I'm not sure that's the best way and I know from experience adding a cron job can be a pain. Another thought was just to check at login but still not sure if that's the best method. I've been searching around for techniques of doing this but of course, most software like this is all encrypted so I suppose it's a case of common sense but I can't seem to think of a suitable technique to check the license. Is there anyone that can help? It would be greatly appreciated. Thanks.
×
×
  • 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.