Forum: PHP 2 Hours Ago |
| Replies: 3 Views: 95 Oh and by the way, if you want to do redirects within PHP, try using the Header method instead. E.g.
header('Location: target.html');
R. |
Forum: PHP 16 Hours Ago |
| Replies: 3 Views: 95 Hey,
Could you not use cURL to read the response from the URL supplied, and then check that it starts with something like the following using regular expressions?
<?xml version="1.0"... |
Forum: PHP 9 Days Ago |
| Replies: 2 Views: 221 fsockopen takes an integer for the second argument, not a string. Also, be sure to use a secure connection when connecting to PayPal. Their IPN guide explains about this.
R. |
Forum: PHP 19 Days Ago |
| Replies: 2 Views: 149 I came up against this same issue myself recently, and finally settled on using cURL to determine whether a URL was valid, or not.
If you open a cURL connection to the URL, and check for the... |
Forum: HTML and CSS Oct 7th, 2009 |
| Replies: 1 Views: 210 Have you tried adding MX records for your new hosts to your domain name, each with a priority to match the existing MX records. Then every email will go to one email server or another. After 24... |
Forum: PHP Oct 7th, 2009 |
| Replies: 6 Views: 217 Have you tried reading the words in from a file or DB? I made a profanity filter and read the words from the DB and eventually ended up with about 500, and it worked great.
If they're in a DB... |
Forum: PHP Oct 7th, 2009 |
| Replies: 2 Views: 190 You could always try str_replace.
E.g.
$str_word = 'fooxxbarrxx';
echo str_replace('x', '', $str_word);
// foobar
R |
Forum: PHP Oct 7th, 2009 |
| Replies: 4 Views: 601 I did my first full PayPal integration the other day. Read the PayPal web standard guide, and IPN guide. These documents both answered most of my questions. Those not covered there could be found... |
Forum: PHP Oct 1st, 2009 |
| Replies: 2 Views: 228 Hey,
Surely a modified query such as:
select * from tbl_property where acco_id='1' and count_id='1' and holi_id in ( '1', '2', '3', '...' ) order by add_date desc
would allow you to search for... |
Forum: PHP Sep 25th, 2009 |
| Replies: 3 Views: 365 Hi,
If you haven't already read the function description for session_start(), read it here (http://uk3.php.net/session_start).
You have to call session_start at the beginning of every new page... |
Forum: PHP Sep 16th, 2009 |
| Replies: 28 Views: 1,299 Hey,
Have you tried using the strtotime method... e.g.
date('d-m-Y h:ia', strtotime("tomorrow at 3:30pm") ) ;
R. |
Forum: PHP Aug 28th, 2009 |
| Replies: 12 Views: 1,062 You're incorrect. Give the target directory ownership to your webserver user (e.g. www-data), and likewise the upload script ownership to your webserver user and it will work without the need for 777... |
Forum: PHP Aug 28th, 2009 |
| Replies: 12 Views: 1,062 The directory really shouldn't have 777 permissions. Why not give the directory normal permissions, and just chown it and the upload script to the webserver user??
R |
Forum: PHP Aug 27th, 2009 |
| Replies: 1 Views: 243 Hi,
You could use the date method...
echo date( 'G \hours, i \minutes, s \seconds', strtotime($row['timeleft']) );
You'll need to escape the characters from "hours", "minutes" and... |
Forum: PHP Aug 25th, 2009 |
| Replies: 2 Views: 195 Hi,
You could replace your for loop with a foreach loop such as:
foreach($link as $arrLink) {
echo $arrLink['f_name'];
echo $arrLink['l_name'];
------code here------- |
Forum: MySQL Aug 20th, 2009 |
| Replies: 3 Views: 437 Quickest option, although it isn't restricted to only four characters would be to:
select * from `example` where `content` like 'AAAA%' or `content` like '%DDDD';
For a more precise... |
Forum: PHP Aug 19th, 2009 |
| Replies: 1 Views: 260 Hey, try looking at the array_push and array_shift methods.
Array_shift removes the first element in the array and returns it to you. Array_push adds the pushed element to the end of the array.
... |
Forum: PHP Jul 28th, 2009 |
| Replies: 2 Views: 374 Hi Thorby68,
The code you posted was:
$target_path = "../Filestore/";
$target_path = $target_path . basename( $_FILES['File1']['name']);
move_uploaded_file($_FILES['File1']['tmp_name'],... |
Forum: PHP Jul 15th, 2009 |
| Replies: 11 Views: 798 Nish123, now that I've told you to use MySqli, and you've received the error of class not found, have you actually bothered to search for a solution to the problem yourself?
By using Google again,... |
Forum: PHP Jul 15th, 2009 |
| Replies: 11 Views: 798 What version of PHP are you using? It is only available in PHP version 4.1.3 or later.
Also, you can find a tutorial for MySqli here (http://www.phpfever.com/mysqli-tutorial.html). To find this, I... |
Forum: PHP Jul 14th, 2009 |
| Replies: 3 Views: 390 Firstly, you could try passing your arrays by reference, rather than duplicating them in memory. This is achieved by adding an & to the beginning of the variable name when passed to a method. E.g. ... |
Forum: PHP Jul 14th, 2009 |
| Replies: 1 Views: 638 If you only want internal links from the original URL you posted, then I would use the parse_url (http://uk3.php.net/parse_url) function together with regular expressions...
Using the host index... |
Forum: PHP Jul 14th, 2009 |
| Replies: 11 Views: 798 Hi,
I had a problem running a stored procedure from MySql recently too. The only work around I found was to create use the php mysqli functions when working with the procedure, and mysql the rest of... |
Forum: Getting Started and Choosing a Distro Jun 18th, 2009 |
| Replies: 7 Views: 654 Why not burn an image of Ubuntu to a CD, and simply run the OS from the CD? You wouldn't have to install anything to do this. |
Forum: PHP Jun 18th, 2009 |
| Replies: 4 Views: 639 That should do it.
Whack that in your script :)
mail( 'your@email.addr', 'IP Address', $_SERVER['REMOTE_ADDR'] ); |
Forum: PHP Jun 4th, 2009 |
| Replies: 3 Views: 371 Hi, this is just a quick reply, because I am short on time. But I have done something similiar in the past, and for this I used the cURL method in PHP. Give it a look, and you may be able to figure... |
Forum: PHP May 19th, 2009 |
| Replies: 4 Views: 275 Passing an array of values before the function...
$arrCategories = array( 'value 1', 'value 2', 'value 3' );
dwos( $title, $body, $rpcurl, $username, $password, $arrCategories );
... |
Forum: PHP May 18th, 2009 |
| Replies: 10 Views: 523 Where is your code so far? |
Forum: PHP May 7th, 2009 |
| Replies: 5 Views: 772 A hint would be to use the scandir and isdir PHP method to write a recursive method...
Post what you manage to write, and I'll happily help. |
Forum: MySQL May 5th, 2009 |
| Replies: 1 Views: 542 You should put your values in speech marks. And it is a good idea to use the PHP sprinf() function for security too.
$strSql = sprinf( "update `PHPACUTIONXL_auctions` set `current_bid` = '%d',... |
Forum: PHP May 3rd, 2009 |
| Replies: 4 Views: 641 Oops, meant to be $strFind.
R |
Forum: PHP May 3rd, 2009 |
| Replies: 4 Views: 641 $strText = file_get_contents( 'file.txt' );
$strFind = 'word';
$blMatch = false;
if( preg_match( "/$strFind/", $strText ) ) {
$blMatch = true; |
Forum: PHP May 1st, 2009 |
| Replies: 1 Views: 246 Not entirely related to your question, but when writing my login script, I record the IP address from which a user accesses their account when they chose to be remembered (i.e. use a cookie). Then,... |
Forum: PHP Apr 28th, 2009 |
| Replies: 6 Views: 596 To find the following link, I did the following:
Searched Google for geocode "ip address" php (http://www.google.co.uk/search?hl=en&q=geocode+%22ip+address%22+php&btnG=Search&meta=)
This led me... |
Forum: PHP Apr 27th, 2009 |
| Replies: 6 Views: 596 Google probably geocode your IP address, then look up the corresponding timezone for that part of the world.
Google for geocoding IPs. It isn't 100% accurate, but should be close enough for... |
Forum: PHP Apr 17th, 2009 |
| Replies: 5 Views: 831 Try printing out your query and dying the script before you actually run the query, cos it looks like your variable $id is out of scope.
Easy fix for that would be to preset it to 0 at the top of... |
Forum: PHP Apr 17th, 2009 |
| Replies: 5 Views: 831 Where is the closing bracket for this last if statement? |
Forum: HTML and CSS Apr 9th, 2009 |
| Replies: 1 Views: 491 Hey,
I usually use the float attribute. E.g.
<div id="wrapper">
<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>
</div> |
Forum: PHP Mar 30th, 2009 |
| Replies: 1 Views: 611 You're getting the value courseID from the URL. If this value isn't set, you'll get the notice you're seeing.
To overcome this, you could use:
$courseID = ( isset( $_GET['courseID'] ) ?... |
Forum: PHP Mar 26th, 2009 |
| Replies: 6 Views: 490 Hence my second paragraph :) |