Hello,
I have a question about using paypal on a page where the user is logged into
It is with php
How can you have the user still authorised for that page if paypal is redirecting back to that page.
I read something about giving the session_id to the custom variable with PDT
What about, if you have multiple session variables. Can y...
I have some strings I need to scrape data from. I need a simple way of telling PHP to look in the string and delete data before and after the part I need. An example is:
When: Sat 19 Sep 2009 22:00 to Sun 20 Sep 2009 03:00 
I want to delete the "When: " and then remove the & and everything after it. Is this a Regex thing? Not...
Hello, I already have written a login and register script. The user can login to their account edit their details etc. The details are stored in a users table which has many different data properties related to the user.
I was wondering, how do I make it so they can view their profile and it shows all the data they input. For example, i...
I'm building a script to verify a transaction receipt with Apple's itunesconnect site (iphone dev) and I can't figure out where's the error in my code. I want to get the "status" value.
Please help me to find what am I doing wrong:
<?php
include("config.php");
$receipt = json_encode(array("receipt-data" => $_GET["receipt"]));...
Hi, im using MAMP on OSX 10.4.11 and while doing a form I came up with an issue:
<?php
$today = date("d.m.y");
echo "<div class=\"newpub\">
<form action=\"insert.php\" method=\"post\">
<span class=\"text\">Data</span><br><input type=\"text\" value=\"$today\" name=\"Date\" size=\"14\" height=\"1\"><br><br>
<span class=\"text\">Co...
I'm currently working on a auto-user-language-detection for providing the content in the user's language.
of course its possible to change the language manually, but if a user visits the page for the first time I want to provide the content in his language.
So I was googling and found the $_SERVER['HTTP_ACCEPT_LANGUAGE']-Var to get a r...
On the one hand mod_rewrite allows me to make userfriendly urls redirecting requests to proper script but on the other I can't use relative links because they will point at nonexistent files.
A little example:
mod_rewrite redirects request
http://site.ru/param/one/page.html
at http://site.ru/script.php
while I have "myimg.jpeg" file at t...
I'm building a site for my school as a pet project, which would include accounts for all students. I want to display a calendar for each student that should have the following features:
It should be able to import events from multiple Google Calendar feeds. Compatibility with either the XML, ICAL or HTML feed will do.
It should be able...
The value is AbcDefg_123.
Here is the regex:
function checkAlphNum($alphanumeric) {
$return = false;
if((preg_match('/^[\w. \/:_-]+$/', $alphanumeric))) {
$return = true;
}
return $return;
}
Should allow a-zA-Z0-9.:_-/ and space in any order or format and does need all but at least one character.
EDIT: Sorry again...
I'm starting to understand the importance of templating in PHP. I'm using PHP itself as a template engine to avoid learning any new language. I'm still not clear on one thing tho, although I have an idea about it. I would like to know what the experts do.
Should I create a full page template, with all tables, forms and everything else (...
Ahoy there!
I can't "guess" witch syntax should I use to be able to extract the source of an image but simply the web address not the src= neither the quotes?
Here is my piece of code:
function get_all_images_src() {
$content = get_the_content();
preg_match_all('|src="(.*?)"|i', $content, $matches, PREG_SET_ORDER);
foreach...
More specifically I can't get the $last_name to display at all.
In the following code:
$name_and_date = "$first_name $last_name | $today | <a href=\"logout.php\">Log out</a>";
Here is more of the code.
// Place Session variables into local variables
$user_id = $_SESSION['user_id'];
$first_name = $_SESSION['first_name'];
$last_name =...
I got a xml file that contains hierarchical data. Now I need to get some of that data into a php array. I use xsl to get the data I want formatted as a php array. But when I print it it leaves all the tabs and extra spaces and line breaks etc which I need to get rid of to turn it into a flat string (I suppose!) and then convert that stri...
what is the best PHP debugger that is for free.
...
Instead of starting new instances of a PHP script when an HTTP request is received, is there any way for one PHP script to handle multiple requests?
...
This issue has been driving me insane. On two separate projects (both of which use PEAR as libraries but are written on completely different custom frameworks) I am using PEAR Auth for authentication which uses the session.
After logging in, users are logged out within an hour or so of being idle. I don't have the exact time, but it's v...
My AJAX search program keeps asking PHP for results of a particular search term. The start of the PHP script reads thru a MySQL DB and initializes, so if the PHP keeps restarting, it will have to read the DB millions of times. If I can keep it alive and let multiple silly AJAX requests be served by a single running PHP script instance I'...
I've read before here on SO that there are some hash algorithms (I think one of those is adler32) that support the following property:
adler32('abc'); // 123
adler32('def'); // 456
adler32('abcdef'); // 579 (123 + 456)
Please note that the results are only examples to demonstrate what I want to archieve. I've tried some examples with ...
For a new project that I'm working on I need to set up a centralized computing environment with a primary server (master) and several workstations (slaves).
The master will recieve several types of job orders with diferent intervals and expiration dates, example:
NAME INTERVAL EXPIRATION OPERATIONS
Job A 5 m ...
Hello, I am trying to dynamically get a php variable and place them into my javascript variable as seen below:
var site_url = "getsite.php?name=SiteName&link=linkURL";
That above script is what I have now and it is harcoded(SiteName,linkURL).
I want to change 'SiteName' and 'linkURL' to display whatever the PHP variable is on another...