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?
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
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
Note: It is worth noting that the
mail() function is not suitable for
larger volumes of email in a loop.
This function opens and closes an SMTP
socket for each email, which is not
very efficient.
Source: PHP manual
What are larger volumes? A 100 or a 1000??
Can I safely make it loop 200 times without much problems? (I can't install pear)
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
Need to create a php file so I can send data to an sql server and get data from the server. There must also be a json support because I am doing this for an iphone app. Could you please help me and give me a source code example.
Thanks in advance.
Hi all,
Did any know about how to search using latitude and longitude using latitude and longitude
using php and mysql as back-end.
I am having zip-code and latitude and longitude for the corresponding city.
With these things as back-end how can i do my search.
thanks in advance.
I need a regular in expression in PHP that I can plug into preg_match_all and find if an @ sign and any character number or letter follows right after that. So if I put "@patrick hello there" it will come up true, if I put in "I saw her @ the mall" it will be false.
Thank you :)
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?
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,
I have some pdf documents on a linux server that I want to combine together to form one document using PHP 5?
Does anyone know if this can be done?
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
sometext( [key] = value which content number and alphabates )
from above,i want only value part by using explode function for only one time.Is it possible.
or any other function is present in php.
I need to know the referring server for a page on my site.
Is there any safe method to check where the user "came" to the page FROM?
I tried uploading this to my server, but this wont output anything at all when I write the adress to the file in the browsers adress bar:
<?php echo $_SERVER['HTTP_REFERER']; ?>
I need to check this in order to display a link on the page or not...
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'm using PHP to upload an image from a form to the server and want to rename the image lastname_firstname.[original extension]. I currently have:
move_uploaded_file($_FILES["picture"]["tmp_name"], "peopleimages/" . "$_POST[lastname]" . '_' . "$_POST[firstname]")
which, of course, renames the file lastname_firstname without an extension. How do I rename the file but keep the extension?
Thanks!
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?
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
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 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
Hello,
how could I add an autocomplete for PHP build-in functions like htmlentities or var_dump?
The autocompleter work for my classes but there's not autocompletion for functions like mentioned above.
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
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.