Hi,
I'm working on an PHP/Jquery autosuggest tool that'll query a large table of tags but I need
some suggestions for the db schema that'll return related tags as well as match-based results.
For example:
I type 'Web':
Results
'Web Developer'
'Web Designer'
'Web Analyst'
and also related tags...
'PHP Developer'
'Flash Program...
The magic function __call() in php are used in classes. Are there any similar magic function but for functions instead? Like __autoload() is for functions.
For example something like this
function __call($name, $arguments) {
echo "Function $name says {$arguments[0]} ";
}
random_func("hello");
...
I am developing a blog, where my client wants to use lot of images, for(articles, titles, advertisement, etc.). he hardly wants any text there, as the blog he wants it to be developed in arabic and he is not happy with any of the supporting font by web browser, nor he wants to adopt the EOT, he will be updating the blog daily (like just ...
Variable $total is an array().
print_r($total) gives:
Array (
[01] => Array ( [title] => text [date] => date )
[02] => Array ( [title] => text [date] => date )
[03] => Array ( [title] => text [date] => date )
)
How to write this array to file.txt?
And how to call created file later, so I can work with array inside it? Li...
Hi,
I need to translate the following code to C# from php. What libraries / namespaces do I need to use?
function sign($method, $uuid, $data) {
$merchant_private_key = openssl_get_privatekey(file_get_contents('merchant_private_key.pem'));
$plaintext = $method . $uuid . serialize_data($data);
**openssl_sign($plaintext, $sign...
I want to access the new Twitter Stream API using Zend_Http_Client. The problem is, that the HTTP request to that web page (http://stream.twitter.com/1/statuses/sample.json) is never finished but keeps loading.
So even when I set Zend_Http_Client to setStream(), I can't get the information it sends out.
This is what my logic currently ...
Hi there!
I want to execute multiple shell-commands with php's exec command. The commands have to be made sequentially and I want to start them with nohup so it can run in the background and my php-script doesn't have to wait for it to finish.
Here's my script:
$command1="nohup convert -trim +repage pic1.png pic2.png; convert pic2.png -...
$total is an multi dimension array:
Array (
[1] => Array ( [title] => Jake [date] => date )
[2] => Array ( [title] => John [date] => date )
[3] => Array ( [title] => Julia [date] => date )
)
How to search for [title] value and give as result ID of an array?
If we search for Julia it should give 3 (ID is [3]).
Thanks.
...
I have discovered that the following PHP code crashes when it runs on a Windows Apache server:
<?php
$test = "0,4,447,11329,316,415,142,5262,6001,9527,11259,11236,1140,9770,9177,9043,11090,268,5270,9907,9196,10226,".
"9399,1476,9368,6929,1659,11074,10869,8774,739,11344,10482,6399,8910,8997,11198,137,10148,10371,5128,767,2483,"....
I'm trying to capture certain parts of HTML using regular expressions, and I've come across a situation which I don't know how to resolve.
I've got an HTML fragment like this:
<span ...> .... <span ...> ... </span> ... </span>
so, a <span> element into which another <span> element is nested.
I've been successfully using the followin...
Hello,
I have a window 2003 dedicated server, i have installed xampp on it.
So i tried to pass download using PHP script such as zina from pancake.org, phpIndexer php functions such as fread, fgets, file, file_get_contents;
If i download let say from apache mod_dirlisting, the speed is 1mbps however on same server with using php, the ...
Hi
I am trying to extract some data from a SQL Sever database via PHP using the Microsoft Drivers for PHP for SQL Server. Some tables I can retrieve fine but others give the following error message:
Array ( [0] => Array ( [0] => 42S02 [SQLSTATE] => 42S02 [1] => 208 [code] => 208 [2] => [Microsoft][SQL Server Native Client 10.0][SQL...
I created a fixture file and the information is effectively updated in the database (I can see it in phpmyadmin), but when I open the page in the web browser there is some information lost:
JobeetJob:
job_sensio_labs:
JobeetCategory: programming
type: full-time
company: Sensio Labs
logo: sensio-lab...
For a website i'm building I need to check wether a location has contracts, these locations can have contracts linked directly to them or when there part of a larger organisation also have contracts that are linked to the organisation.
I am trying to use a DQL query to first check if there are contracts linked directly and then if there...
Hi
Is it possible to show multiple Fancybox alerts on one page i.e. A user triggers one alert, then within the alert, he can trigger another which will appear without closing the first.
Example
Click the zoom icon on the products and then click the 'Tell a friend' link
Thanks
...
I'm working in Drupal 6.
I have a requirement to add a particular block when the user is on a blog page. Sounds simple enough, but it's been driving me mad.
The block needs to be shown when the user is viewing a blog overview or an individual blog entry.
I initially thought I could filter it by page name so it only appears when page =...
Hi,
I have a test script to receive an xml file via http post and it appears to work ok when I use it internally. When I move the script to a web server which can be accessed externally nothing appears to be happening. Anyone any ideas?
<?php
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$inp = fopen("php://input");
$o...
I want to use a combination of xml & xslt as a templating system. The question that I want answered is: can xslt and PHP communicate with each other (i.e share variables)?
...
Generally, i use php, but any other possibilities. Hope my hosting provider will support it.))
...
current.php is page which we open in browser.
other_1.php and other_2.php are pages, which we want to execute. These two pages do a big job and work slowly.
How can we call both other pages to work, just when we open current.php?
current.php should just open and die, nothing get, just send commands to open.
If current page will inclu...