Jump to content

ciber

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    South Africa

ciber's Achievements

Member

Member (2/5)

0

Reputation

  1. I tried searching google and phpclasses.org for something of this nature, but can't seem to come across anything. (or possibly using the wrong keywords). Basically I am looking for a class that I can instantiate with a URL (or similar), and in turn it will provide me with the appropriate embed code for that video along with a thumbnail. (Thumbnail optional) I currently having something im using, but its restricted purely to YouTube, and wish to expand it to all video providers. Does anyone know of any code available (class) that can provide me with what I mentioned above. Thanks
  2. I dont know what did this, but its irritating the living hell out of me - how can I fix the arrow, and get it centered? (See Attachment) [attachment deleted by admin]
  3. Yea, I think I must generate it, and check rather its better that way!. Thanks for your help.
  4. so if I use PHP's uniqid, will the ID's generated ALWAYS be unique? even if its run on multiple systems? That is why I would prefer using a ticketing system, since regardless it will always be unique.
  5. OK so by using mysql_insert_id(), is there a chance that another request for a key could be executed inbetween the two queries, if your server is very busy and processing thousands of queries? say for example: R1: mysql_query("REPLACE INTO Tickets64 (stub) VALUES ('a')"); R2: mysql_query("REPLACE INTO Tickets64 (stub) VALUES ('a')"); R1: $key = mysql_insert_id(); R2: $key = mysql_insert_id(); where R1 is request 1 by some user, and R2 is another request by another user
  6. basically I got 10 different tables, which I need each to have a unique key throughout the database. see this link: http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ also I want to transform this into my project next year for university, so im building it large scale, even though it will never run live
  7. Hi, I am currently working on a very detailed personal project during my vacation to keep me busy, but I have a problem, I am trying to create a unique id, without having the chance of a repetition of the id, even if its infinitely small. So I found the flickr ticket id system to be a good choice, since it was sequential and effective. My problem now is, how can I execute 2 queries simultaneously, given the hypothetical change that if I execute them with two separate queries (mysql_query), that there is the chance that another query could be executed in between the break, causing two id's to be the same. Since mysql_query can only execute a single query I am a bit stuck. I thought about possibly using CGI, but then again I have never used it, so I don't know its limitations. Can anyone suggestion anything to me for this problem, as to how I can execute two query strings in the same query.
  8. Hi, Basically I am going to give a short description to my problem with pseduo and comments (-->), there is too much to paste all my code here: basically include(config.php) --> database connection include(global.php) --> class is instantiated here as $p ($p is GLOBAL) --> I print_r the $p value here, and it shows (debugging) switch() case x: include file.php; break; --> but when I try to access it or print_r it here (here being within the file.php), via the file that has been included above "include file.php", it does not see it. I have to re-declare the $p variable with the class, within the included file. any tips as how to solve this please; I dont see why it wouldnt see it, since all the file is that I am including is an HTML file with a few PHP lines, which checks if a user has permission: if(!$p->check()) redirect("index.php");
  9. ciber

    PHP FTP

    nevermind, I can get my new host to wget the file via ssh. thanks
  10. ciber

    PHP FTP

    I still have access via the web interface.
  11. ciber

    PHP FTP

    Hi, I tried searching google with out any luck. I am looking for a script which will allow me to ftp everything from one server to another, I am moving servers and want everything in my one directory to be directly transferred to the new server. The old host is being a bitch now, and wont allow me to use FTP to the server from my pc, or SSH - so I am wanting to FTP my stuff via the server itself using PHP's FTP function. Thanks
  12. Nevermind seems it was something I was doing wrong
  13. I have 2 servers I use for hosting, both Linux and Apache. I am executing the same php script on both, the one server the information is sent to me as it is processed, the other it only sends when it is finished processing the script. How can I change it so that it sends me the stuff as it processes it, and not right at the end? Thanks
  14. I have tried to look google, but was unable to find anything. and the search daemon is giving me errors on this site. So, when I am calling lines from a text file, I am getting a problem. to explain, I will use a # to show were this "white space" is I am getting This is the text file url.com url2.com url3.com when PHP reads the file, and I output it into PHP its reading it like this url1.com# url2.com# url3.com url1.com and url2.com both are getting this "white space" at the end of them, and the last entry does not. I have tried to use str_replace(" ","",$line) and str_replace("\r","",$line) but nothing. can anyone advise me as to what character this is that is being outputed. my code I'm using $f = fopen ("list.txt", "r"); while ($line= fgets ($f)) { if($url == $line){echo $line;} } fclose ($f);
  15. Hi I am wanting to disable a plugin from being used in a specific page template in my wordpress installation, however I need it to work normally on the rest of the site. Is there perhaps a piece of code I could use to prevent a specific plugin from executing on a specific page. for example disable_on_page("plugin_name");
×
×
  • 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.