Search Results

Showing results 1 to 40 of 139
Search took 0.01 seconds.
Search: Posts Made By: robothy
Forum: PHP 2 Hours Ago
Replies: 3
Views: 95
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Solved: online unix
Views: 654
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
Forum: PHP May 7th, 2009
Replies: 5
Views: 772
Posted By robothy
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
Posted By robothy
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
Posted By robothy
Oops, meant to be $strFind.

R
Forum: PHP May 3rd, 2009
Replies: 4
Views: 641
Posted By robothy
$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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
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
Posted By robothy
Where is the closing bracket for this last if statement?
Forum: HTML and CSS Apr 9th, 2009
Replies: 1
Views: 491
Posted By robothy
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
Posted By robothy
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
Posted By robothy
Hence my second paragraph :)
Showing results 1 to 40 of 139

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC