Im writing a php script to compare the similarity of 2 strings. This works pretty good at the moment, but what I would like to do is match words when one is a synonym of the first.
Any thoughts?
In my application am submiting my form by using post for a php page.
<form method="post">
<select name="txtplace">
<option value="1">ajith</option>
</select>
</form>
here when i am try to get the value of my dropdown its only getting 1.How can i get ajith
Hi
No thread about use or unuse of obfuscusion please ^^
Just share creative approaches how to obfuscate in php the really smart way plz.
plain md5 and base64_decode is too static ..
what you think regarding hash, salt
what about dynamic Variables (even for the same $var).
Thx for any creative input
Hello.
I am looking for a possibility to run a PHP + MySQL solution on a desktop.
Can Adobe AIR accomplish that for me?
Will the setup be able to access the COM port of the computer?
There is a way to check with a "IF" if a function fails in php?
Ex.
If (getimagesize($image) returns and error) {
echo 'Error: function dont work';
}
else
{
// do something
}
Thanks!
Hi Guys,
I have a bit of php code like this:
$test = "<!--my comment goes here--> Hello World";
Now i want to strip the whole html comment from the string, i know i need to use preg_replace, but now sure on the regex to go in there.
Can anybody help?
Thanks
I have a form that posts to a page. I want to display an image if the value of the item posted equals "paypal".
I need to write something that says;
if $_POST['method'] equals "paypal" then show paypal.gif
if $_POST['method'] equals "mastercard" then show mastercard.gif
I hope I made a bit of sense, new to php trying to learn the best I can
This command add the text "flower" to the image:
convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg
I'm using ImageMagick 2.2.0. I'm running it from PHP using:
system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg');
but I'm not getting the result
You all know about restrictions that exist in shared environment, so with that in mind, please suggest me a php function or something with the help of which I could stream my videos and other files. I have a lot of videos on the server, unlimited bandwidth and disk space, but I am limited in ram and cpu.
Using PHP: How can I create an image to display an email address (to help reduce spam)?
Meaning, if I want to display "[email protected]" on my web page, since crawlers can easily find that text - I want to display the email address as an image that says "[email protected]".
How do I do that? I want the font to be:
color: #20c
font: 11px normal tahoma
Hello,
I am trying to add an image from a local directory to a php page on my localhost. It adds fine, but does not display the image.
What exactly am I doing wrong here?
Thanks
Jean
i have a secure login using .htaccess, and i need to know which user accessed the area so that my php index can show him his invoices, but the problem is that how to capture the user name when promoted in .htaccess
I'm looking for a way to use the php number_format function or something similar that will add the thousand seperator but will leave any decimal part of the number intatct without and formatting of this. For example:
39845.25843 = 39,845.25843
347346.8 = 347,346.8
1000000 = 1,000,000
Thanks
I am new to image creation in php.
Have a look here
http://s.kapipal.com/image_progress?v=.46
If you change the param value, bar progress should also be changed to passed value
How can i implement something like above?
Thanks for the help inadvance
Im trying to achieve an output like this
{"status":"ok","0":{"id":"11","title":"digg","url":"http://www.digg.com"}}
but instead i am getting this
{"status":"ok","0":{"id":"11","title":"digg","url":"http:\/\/www.digg.com"}}
this is the php code im using to generate the json
$links = array('id'=>'11','title'=>'digg','url'=>"http://www.digg.com");
$msg = array('status'=>'ok',$links);
echo json_encode($msg);
any idea what is causing this?
This is kind of an academic question, so feel free to exit now. I've had a dig through Stack for threads pertaining to URL/Controller mapping in MVC frameworks - in particular this one:
http://stackoverflow.com/questions/125677/php-application-url-routing
So far, I can ascertain two practices:
1: dynamic mapping through parsing the URL string (exploded on '/')
2: pattern matching matching url to config file containing available routes
I wanted to get some feedback (or links to some other threads/articles) from folks regarding their views on how best to approach this task.
hi,
similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace
$str = '(ABC)some text'
into
$str = 'ABC';
currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?
hi
i am having a link like below
<a href="#" onclick="window.open('http://www.twitter.com/home?status=Reading+Facebook share, Yahoo Buzz and Tweet this buttons for Blogger blogs+http://www.didiknow.com');">Tweet this</a>
i want to insert a php variable value inside for the status thing
like
<a href="#" onclick="window.open('http://www.twitter.com/home?status=$markme_ddesc">Tweet this</a>
how to do so?? please help me..
Hi have some forms that I want to use some basic php validation (regular expressions) on, how do you go about doing it? I have just general text input, usernames, passwords and date to validate. I would also like to know how to check for empty input boxes. I have looked on the interenet for this stuff but I haven't found any good tutorials.
Thanks
Hi,
I have a sign up page written in php, that goes to a confirmation page after processing. In the confirmation/ thank you page there is a 3rd party script that counts the number of successful registrants. how would I limit the script to be loaded per successful registration?
Hello everyone:
I've got a typical problem when trying to insert a date into MySQL.
The column defined in MySQL is of type DATE. My PHP version is 5.3.0
Apart from this date-related issue, the rest of my code works just fine.
And this is my PHP script to do this:
$tablename = BOOKS_TABLE;
$insert = mysql_query("INSERT INTO $tablename (barcode, book_name, volume_num,".
" author, publisher, item_type, buy_price, buy_date) VALUES ".
"(".
"'" . $barcode . "', ".
"'" . $bookname . "', ".
"'" . $volumenum . "', ".
"'" . $author . "', ".
"'" . $publisher . "', ".
"'" . $itemtype . "', ".
"'" . $buyprice . "', ".
"'" . getMySQLDateString($buydate).
//"'STR_TO_DATE('".$buydate ."', '%d/%m/%Y'))'". //nothing changes in MySQL
")");
And this is the faulty function :
function getMySQLDateString($buydate) //typical buydate : 04/21/2009
{
$mysqlDateString = date('Y-m-d H:i:s', $strtotime($buydate));
return $mysqlDateString;
}
The first commented out line wouldn't do anything, the script is executed with no error, however, there is nothing changed in datebase after this.
The current approach will cause a Fatal error saying function name must be a string in this line.
Actually I followed this thread on SO, but just cannot pass the date into MySQL...
Can anyone help me figure out which part is not right?
How would you do it, in this case, to get it right?
Sorry about such a journeyman-like question, thanks a lot in advance.
Hi experts,
we have an old large application that was not built on any framework. However now we want to transfer it to a php framework. Its a new area for us so we are not sure what it takes to transfer the older application to a framework like Zend?
Any help will be appreciated.
thanks
ello all
im new to php and server scripting ( coming from the java/cpp background )
my question is , if i like to be able to build some kind of single tone cache that will hold me data in memory in all the web application
life , something that when i start the web server it will start main cache
that will server the web application not inside sessions static cache
like singletone map in c++/java that that leaves all the time
what are my options ?