Validating email

I am validating an email using filter_var($user_email, FILTER_VALIDATE_EMAIL), once an email passes that successfully, i would like to check the individual domain being used as the email provider.
I need to check if the email contains: hotmail, yahoo, gmail etc in the email field, ignoring the .com, .net parts of the email address so for example, [...]

Getting 404 Not Found error while trying to use ErrorDocument

I know this thread has been talked a lot on the web and here, and I tried almost all the methods, but still I’m having the same problem.
This is my url on my local server ( MAMP )
http://localhost:8888/hellothere/index.php

And I’ve tried to insert a wrong path to take me to wrong page , like below [...]

Function to check if url is valid

Well.. I want to check if the a url is valid.
So that they can not just enter things like hoadw, adwij£1%, but that the inserted url have to be a valid one like domain.com.
Was thinking of a function like this:
function checkurl($url)
[...]

Convert the decrypt code in PHP to C#

I need to convert BlowFish Descrypt code in PHP to C#.
PHP code,
function mdecrypt($data, $key) {
$td = mcrypt_module_open(MCRYPT_BLOWFISH, ”, MCRYPT_MODE_ECB, ”);
$decrypted_data = mdecrypt_generic($td, func_hex2str($data));

return $decrypted_data;
}

#
# Convert hex to string
#
function func_hex2str($str) {
$ret = “”;
$l = strlen($str);
[...]

Inserting into table based on alternate table value

I can’t get the syntax right for this. I’m trying to get the $nproj_hours value that is sumitted via a form to look-up the hours_id key value associated to it in the hours table, and put that numerical value in the summary table in a new row (I’ll be doing this for departments and [...]

Why would $_FILES be empty when uploading files to PHP?

I have WampServer 2 installed on my Windows 7 computer. I’m using Apache 2.2.11 and PHP 5.2.11. When I attempt to upload any file from a form, it seems to upload, but in PHP, the $_FILES array is empty. There is no file in the c:\wamp\tmp folder. I have configured PHP.INI [...]

Reading user environmental variable in php

I have an environmental variable defined in Windows environmental variables -> user variables
$MY_VARIABLE=mypath

and in php I tried to access it like below
<?php
echo $_ENV["MY_VARIABLE"];

but it doesn’t print anything. Am I missing something here or is it that PHP doesn’t have access to user environmental variables ?

What are the alternative ways to manipulate camera raw files in PHP?

I’m re-coding my personal photo blog and want to upload and manipulate photos on site.
I know that Imagick ( Convert RAW photos to JPEG in linux/php ) is an option but I’m wondering if there are any other options out there which enables PHP to manipulate and convert camera raw images (crw, dng etc.)?

get tabs based on select box value

i have a select box with values 1 to 5 and if i select value 2 from select box i should get 2 tabs or 3 i should get 3 tabs..
here is select box code..
<select id=”Week” name=”Week”>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option [...]

Import and update data LIMIT in SQLite using PHP

I have a huge PHP script to IMPORT and UPDATE 100 rows in SQLite3 database where one row has 200-300 characters of data. One fragment of a code is simple and I have it on another page
COMPLETE CODE.
EXAMPLE: I have two tables ex1 – witch is Parent, and ex2 – witch is Child. Relation: 1-M
Whan [...]

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories