Jump to content

canadabeeau

Members
  • Posts

    364
  • Joined

  • Last visited

Everything posted by canadabeeau

  1. My aim is to have a PHP script read and extract data from the CSS and place into a DB, so does anyone have an idea or solution, the strtok breaks it up into little pieces so I dont think that really helps, unless you can suggest a reliable way to stich it back together Thanks again
  2. I am using this code, but the problem is there is multiple cases of text that lies between { and } and this code only does one instance function ExtractString($str, $start, $end) { $str_low = strtolower($str); $pos_start = strpos($str_low, $start); $pos_end = strpos($str_low, $end, ($pos_start + strlen($start))); if ( ($pos_start !== false) && ($pos_end !== false) ) { $pos1 = $pos_start + strlen($start); $pos2 = $pos_end - $pos1; return substr($str, $pos1, $pos2); } } $array = ExtractString($file_contents, '{', '}'); echo $array;
  3. Hi Guys, I need a PHP function which will place into and array all text that does not sit between { or }, eg #header_crm a { display:block; height:260px; margin:0px; padding:0px; } it would add to the array "#header_crm a" only and not the other content, any ideas. I have tried explode("{", $file_contents); but it still displays the other stuff even if I use "{,}" As usual thanks for all the help in advance
  4. EDIT: Sorry I was wrong, the one step method was so off and inaccurate so the problem still exists of converting HEX to DECIMAL without it being scientific notation :-D
  5. The point is I am converting a ASCII to HEX, then the HEX to DECIMAL and finally the DECIMAL to BINARY and it (obviously is important that it does not go to scientific Again any help appreciated
  6. Hey guys, I have this PGP code $dec = hexdec($hex); now it is converting to decimal but as scientific, ie 6.44301743422E+18 I need it to be pure decimal, any ideas on how to fix this or is there another PHP function I can use? Thanks in advance
  7. bump, how do I encrypt for say 128bit? How does say "Hello" be encrypted with 128bit?
  8. I really want to do my own, just need to know the answers to the above, thanks thorpe :-)
  9. Is the 128bit simple just how long the custom key should be (ie 4bit would be ABDC??) or not?
  10. Hi guys and gals, I am looking at building my own PHP encryption function, but I firstly need to know, would it be possible (and any how you can offer) to make say this scentence: "The Quick Brown Fox jumps over the fence" enceypt using a custom randomly generated key (I know how to generate the key) but how do you do it so it is like 128bit encryption or 64bit?? Any help would be graetly appreciated
  11. this has become really serious now and stressing me out as I have reinstalled the whole machine from OS to PHP, so I really need help to find out why this is still occuring
  12. Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\inetpub\wwwroot\functions.php on line 4 Why is this error code happening, I get the fact that it is unable to find the DB, but why, it has only just recently started to happen and is now a major problem. Any help would be greatly appreciated, PS I can enter my login details into phpmyadmin but it doesn't load because of a similar error. I have tried reinstalling my entire machine, Winodws, Apache, MySQL to lot and still getting this error
  13. I has just reinstalled MySQL with the latest version, but still having those errors, any ideas? I really need to sort this :-)
  14. Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\inetpub\wwwroot\functions.php on line 4 Why is this error code happening, I get the fact that it is unable to find the DB, but why, it has only just recently started to happen and is now a major problem. Any help would be greatly appreciated, PS I can enter my login details into phpmyadmin but it doesn't load because of a similar error.
  15. one slight addition when it gets the data between my_res and the next available ";" it also needs to replace that data taken to the variable with a momment (\\data moved), any help greatly appreciated
  16. Hi I have a string (eg "testahalpa my_res(ldldl);") now I want a PHP way of selecting everything that is in between my_res and the next availiable ";" now I do not want it to delete the rest of the string, rather may a variable which contains the new selected data Thanks in advance
  17. Hi guys, I need help making a PHP script which will remove "new lines" I have a page called text.php, I want index.php to read test.php and remove all the new lines so the page is all on one line. test.php now <?php echo "aa"; $a = "bgaga"; echo $a; ?> test.php wanted <?php echo "aa"; $a = "bgaga"; echo $a;?>
  18. any ideas I tried using $value = ' '.$row['value']; and echoing it but again it only does it for the first entry :-( any ideas ie is does background.... font-style: .....
  19. I basically have a .sql file which I need to use a HTML form that I will "Browse" to it and then submit to the formsubmit.php which I then need to do as per .sql file (ie add table, or update table, etc)
  20. so what should I do, I don't exactly get oni-kun's suggestion?!
×
×
  • 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.