Search Results

Search found 34355 results on 1375 pages for 'php extensions'.

Page 142/1375 | < Previous Page | 138 139 140 141 142 143 144 145 146 147 148 149  | Next Page >

  • PHP Priority Queue Implementation

    - by Zahymaka
    I just finished coding a complex job assignment application where a lot of the work was done using priority queues. When I deployed, however, I discovered the web server ran PHP 5.2. Has there been an implementation for PHP<5.3 that can server as a drop-in replacement for SPLPriorityQueue?

    Read the article

  • Union results of two functions in php class

    - by Max
    I have php class(simple example): <?php class test{ public function __construct() { //some code } public function __destruct() { //some code } public function echo1 { //some code return 1; } public function echo2 { //some code return 2; } } How could I return results of this two functions echo1 and echo2 in class in one row don't creating two new objects for each function?

    Read the article

  • New to PHP, need book recommendations

    - by bran
    Hey guys, I need few good book recommendations for PHP. I am trying to learn to develop webapps. I know there are other (arguably) better language out there that I should start with (ie, python). But I want to start with PHP and go from there. My programming knowledge is limited to html/css (I know they are not actually programming languages), and I have gone through half of a python book. Thanks! :)

    Read the article

  • PHP user sessions

    - by Temek
    I'm bit confused. I've been building my sites with my own session system, but i'm not sure how secure the php's own session system is. My session system usually just has user id and quite harsh hash, which does not include user name or password for generation. I save the hash in the user database and as a cookie to confirm the user session on every page load. So my question is should i keep using my own systems or try out php sessions?

    Read the article

  • dynamically scale images in php jpg/png/gif

    - by Patrick
    Is there a simple way of dynamically scaling an image in php? Id like to specifically use some kind of function where i can insert it into my heml such as <img src=image.php?img=boss.jpg&width=500> and of course it would then scale the image to whatever height constrains it to 500px wide i appreciate all input, thanks. EDIT does need to include jpg png and gif file types

    Read the article

  • Get the layout mode (landscape or portrait) of a pdf from php/linux

    - by Jonathan Hendler
    Given a PDF, how can one get the layout mode of a PDF (or relative width/height) using a PHP lib or linux command line tool? Using http://www.tecnick.com/public/code/cp%5Fdpage.php?aiocp%5Fdp=tcpdf which can set this variable on new PDFs, but for existing pdfs from adobe. Thought of converting pdfs to ps, or using gs in some other way - like converting it to an image first, and getting the width and height of that. Is this the best way?

    Read the article

  • Remove an empty directory from a ZIP file with PHP

    - by desolat
    PHP brings a class for ZIP file manipulation. It also allows the creation of directories with addEmptyDir() and the deletion of an entry with deleteName(). But the deletion does not work on directories (empty or not). Is there any way to delete empty folders in a ZIP file (prefered is buildin PHP functionality)?

    Read the article

  • PHP: Set variable in to include file in 'if' statement

    - by swiftsly
    I am trying to set a variable in an 'if' statement so that only when the 'if' statement is true, the variable will be set and will be able to be used somewhere else on the page. Here's what I have tried: if ($row[8] == 1) { echo 'Message here'; ob_start(); include('F164.php'); $f164 = ob_get_clean(); } as well as: if ($row[8] == 1) { echo 'Message here'; $f164 = include('F164.php'); }

    Read the article

  • what is other option for HTTP_REFERER in php?

    - by user251336
    Hi all, I want to know is there any option/work sround for $_SERVER['HTTP_REFERER']. Because 'HTTP_REFERER' can not be trusted. Then What is other way to know that from which url the request has came from?. Here is the situation - http:// abc.com/one.htmlwill have an iframe having src=http:// xyz.com/giv.php?param=1. How giv.php on xyz.com will know that request is coming from http:// abc.com/one.html?

    Read the article

  • Smart coding on ActionScript 2 (importing vars from a php)

    - by DomingoSL
    Hello, i have a php who when is executed it give me a couple of vars in this format: &lVar1=DATA1&&lVar2=DATA2&&lVar3=DATA3 and soo... The problem is that i dont know the quantity of lVar the php script is gonna give in any time, so i cant figure out a smart script in AS2 to import all of them into a array to my flash. Can you help me?

    Read the article

  • How to sync two folders in PHP?

    - by OM The Eternity
    I am using windows, Mysql DB, PHP I am building the Joomla Component whose one of the functionality is to synchronize the folders I want to sync two folders of different name.. How can I do this? It has to be dne in the same machine, no two different servers are involved in it.. How to sync two folders in PHP?

    Read the article

  • How to optimize foreach loop in PHP

    - by vanneto
    First off, I know the title is generic and not fitting. I just couldn't think of a title that could describe my problem. I have a table Recipients in MySQL structured like this: id | email | status 1 foo@bar S 2 bar@baz S 3 abc@def R 4 sta@cko B I need to convert the data into the following XML, depending on the status field. For example: <Recipients> <RecipientsSent> <!-- Have the 'S' status --> <recipient>foo@bar</recipient> <recipient>bar@baz</recipient> </RecipientsSent> <RecipientsRegexError> <recipient>abc@def</recipient> </RecipientsRegexError> <RecipientsBlocked> <recipient>sta@cko</recipient> </RecipientsBlocked> </Recipients> I have this PHP code to implement this ($recipients contains an associative array of the db table): <Recipients> <RecipientsSent> <?php foreach ($recipients as $recipient): if ($recipient['status'] == 'S'): echo "<recipient>" . $recipient['email'] . "</recipient>"; endif; endforeach; ?> </RecipientsSent> <RecipientsRegexError> <?php foreach ($recipients as $recipient): if ($recipient['status'] == 'R'): echo "<recipient>" . $recipient['email'] . "</recipient>"; endif; endforeach; ?> </RecipientsRegexError> <?php /** same loop for the B status */ ?> </Recipients> So, this means that if I have 1000 entries in the table and 4 different status' that can be checked, it means that there will be 4 loops, each one executing 1000 times. How can this be done in a more efficient manner? I thought about fetching four different sets from the database, meaning 4 different queries, would that be more efficient? I'm thinking it could be done with one loop but but I can't come up with a solution. Any way this could be done with only one loop?

    Read the article

  • PHP UTC Timestamp Creation

    - by Ajith
    I am using ubuntu(apache) for my php application.i need to create a timestamp for authenticated call of a webservice.In php i getting only 10 digit timestamp like 1273229733.But i need to create like 1273229613000 .How can i solve this problem.help me please.

    Read the article

  • Php on windows and blocks

    - by zerkms
    My development PC has windows installed. And I've experienced weird php behaviour: <?php file_put_contents('c:/q', microtime(1) . "\r\n", FILE_APPEND); sleep(10); When I run this script in browser simultaneously in two different tabs I get such results 1294713622.125 1294713632.2188 which obviously is not what I expected, although in CLI everything is fine. So the question: what can block execution? (session.auto_start is Off)

    Read the article

  • Adding php script to cron

    - by shyam
    What should be given as the url to the script while adding it to cron scheduler. The script is at, say, domain.com/scripts/script.php or /public_html/scripts/script.php PS:I am using cPanel

    Read the article

  • Load php file wth xml header

    - by John Smith
    I have a php file with an xml header and xml code, named test.php. How do I load this file as an xml? The following doesn't work: $xml = simplexml_load_file('test.php'); echo $xml; I just get a white page. The test file is saved as php, as it's dynamic. It's loading data from the tradedoubler api. The xml looks something like this: <voucherList> <voucher> <id>115</id> <programId>111</programId> <programName>Program 111</programName> <code>AF30C5</code> <updateDate>1332422674941</updateDate> <startDate>1332370800000</startDate> <endDate>1363906800000</endDate> <title>Voucher number one</title> <shortDescription>Short description of the voucher.</shortDescription> <description>This is a long version of the voucher description.</description> <voucherTypeId>1</voucherTypeId> <defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)</defaultTrackUri> <siteSpecific>True</siteSpecific> </voucher> <voucher> <id>116</id> <programId>111</programId> <programName>Program 111</programName> <code>F90Z4F</code> <updateDate>1332423212631</updateDate> <startDate>1332370800000</startDate> <endDate>1363906800000</endDate> <title>The second voucher</title> <shortDescription>Short description of the voucher.</shortDescription> <description>This is a long version of the voucher description.</description> <voucherTypeId>1</voucherTypeId> <defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)url(http://www.example.com/product?id=123)</defaultTrackUri> <siteSpecific>False</siteSpecific> <landingUrl>http://www.example.com/product?id=123</landingUrl> </voucher> </voucherList>

    Read the article

  • What is the best php encoder software ?

    - by question_about_the_problem
    What is the best php encoder software? http://www.freedownloadmanager.org/downloads/php_encoder_software/ http://forums.digitalpoint.com/showthread.php?t=596680 or another. Everybody say Zend Guard. But you can decode/decript zend's files at the page http://www.showmycode.com/ I think, SourceGuardian is good. But I'm not so sure.

    Read the article

  • how can i update my dynamic ip with curl php

    - by testkhan
    i have registered a domain and now i want to host it on my own home server ... i want to setup a system with php curl so that i login to my domain website and update my name servers i.e http://mycompany.com/webhosting/domain/manage.php?action=showNS&domain_id=10003489 i want to login to that site and auto update my dynamic ip address...

    Read the article

< Previous Page | 138 139 140 141 142 143 144 145 146 147 148 149  | Next Page >