Quick question: One can set the path where a cookie is valid, but is it also possible to get (read) this path from the cookie (in PHP)?
Or else: is it possible to extend a cookie's time, without knowing what path it's on (but keeping the path the same)?
I am using exec() inside a a script that runs as a daemon and forks child processes using the pear class Net_Server.
I am getting a strange issue whereby the return code (the third param of of exec) comes back as -1. When I run the command on the command line, or with exec in a normal php script the return code is 0 as it should be. Anyone have any idea why this is happening, and how to fix it?
This code is being used to parse email, it's stored as a table in a mySQL database. I believe it's PHP code. What does the (.+) do?
/A new order has been successfully placed through(.+)Name:(.+)Company:(.+)Email:(.+)Address 1(.+)Order ID:(.+)Date:(.+)Payment Type:(.+)Order Status:(\s*)Accepted(.*)\n(.+)\$([\d\.]+)\s+X/si
Thanks, super-brainiacs!
How to write byte by byte to socket in PHP?
For example how can I do something like:
socket_write($socket,$msg.14.56.255.11.7.89.152,strlen($msg)+7);
The pseudo code concatenated digits are actually bytes in dec. Hope you understand me.
I need a way to see all the defined variables of the current PHP instance.
By currently defined I mean all the globals, all the local to THIS scope and all the locals to other scopes.
Is there something built in?
Has anyone here tried it or is it possible?
I've been using PHP for quite a few years but never know exactly the underlying c scripts.
Is there a way to go into it?
Hi all
I Have a system. I which I need to edit the PDF in every specific evcent, for that I googled a lot and reached to conclusion that it can be achieved by first converting PDF to HTML, editting the HTML and then again converting the same HTML to PDF file.
Is there any Library available in PHP to convert PDF file to HTML?
And if anyone available with other way to achieve my task, please let me know,
NOTE: PLEASE DO NOT SUGGEST ZEND FRAMEWORK USE.
In php how would I grab all javascript from a page given it's url? Is there a good regular expression to get the src of all javascript script tags or the script inside of them?
Hello, i was viewing this video and i really want to develop this is PHP with no AJAX, do you how to start? where can i find some examples codes? Thanks.
Hi all,
Somehow the following code is very slow on another server, on my own server it works ok
http://www.bldd.nl/stackoverflow/test.php
How should i optimize this code??
Kind regards
Is there a static code analyzer for PHP files? The binary itself can check for syntax errors, but I'm looking for something that does more, like unused variable assignments, arrays that are assigned into without being initialized first, and possibly code style warnings. Open-source programs would be preferred, but we might convince the company to pay for something if it's highly recommended.
I'm building a PHP framework and my english is not the best.
There are several classes (database abstraction, module, router,...) in my framework and there is a place where they all have to be initialized and executed together.
What is a good name for a "master" class that initializes and runs all other classes?
I like CKEditor and my server uses PHP. I want to use CKEditor to edit the static HTML pages. Is there something that I can drop in that will give me a file browser and let me click a file and edit in CKEditor and save? Image upload would be nice but optional.
hello
is there any way that when i user send an email to [email protected] the php script reads the email's information and replay to the user automatically ?
Cheer
For example: I want to accept or reject a photo.
The input button for accept and the form is:
<form method="post" action="viewRequests.php">
<input type="submit" onClick="showAlertBox()">
</form>
showAlertBox() is a javascript function which shows a confirmation dialog with Yes or No. If I choose No then the form submission should not be triggered.
what to do in this case
Does die() successfully terminate the php script at that point or only with output bufferring?
would it be secure to do a:
if(!isset($_SESSION['logged_in'])){
die('you do not have permission to access this page.');
}
This is a follow up on another question I had asked on stackoverflow a day or so ago.
I'm working on trying to call flickr.people.getPhotos... but no matter what I do I keep getting this... jsonFlickrApi({"stat":"fail", "code":99, "message":"Insufficient permissions. Method requires read privileges; none granted."}); but if you were to look at my "Apps You're Using" page (on flickr) you'd see this.
So, even though I've authorized the max permissions... flickr says I don't have any granted!?
I even used flickr.auth.oauth.checkToken to double check that my access token was right, this was the value returned; jsonFlickrApi({"oauth":{"token":{"_content":"my-access-token"}, "perms":{"_content":"delete"}, "user":{"nsid":"my-user-nsid", "username":"designerseventeen", "fullname":"Designer Seventeen"}}, "stat":"ok"})
Here's how I'm attempting to call flickr.people.getPhotos...
<?php
// Attempt to call flickr.people.getPhotos
$method = "flickr.people.getPhotos";
$format = 'json';
$nsid = 'my-user-nsid';
$sig_string = "{$api_secret}api_key{$api_key}format{$format}method{$method}user_id{$nsid}";
$api_sig = md5( $sig_string );
$flickr_call = "http://api.flickr.com/services/rest/?";
$url = "method=" . $method;
$url .= "&api_key=" . $api_key;
$url .= "&user_id=" . $nsid;
$url .= "&format=" . $format;
$url .= "&api_sig=" . $api_sig;
$url = $flickr_call . $url;
$results = file_get_contents( $url );
$rsp_arr = explode( '&',$results );
print "<pre>";
print_r($rsp_arr);
print "</pre>";
I am officially stumped... and in need of help.
Thanks!