-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
welcome can you please click solved (bottom left)
-
so this i think $data = 'Spain had also regained its growth in the overall number of <a href="http://www.lamangaspain.com/index.htm" target="_blank">holidays</a> from the UK, after being hit by the rise in popularity of other cheap destinations such as Egypt, Turkey and Eastern Europe.<br/><br/>In total, Brits made over 12 million trips to Spain last year to spend more than £5 billion on their southern neighbours.<br/><br/>According to Mintel, agents were currently struggling in Spain, and needed to expand or appeal to a more high-end market to reverse the negative trend.<br/><br/>The research showed that the country\'s appeal to the young was falling as the 20 to 24 year old group was now the least likely to travel to the country.<br/><img alt="ADNFCR-1179-ID-18240457-ADNFCR" src="http://feeds.directnews.co.uk/feedtrack/adferocopyright.gif?feedid=1179&itemid=18240457" />'; $data = preg_replace('/(<img.*>)$/i', '', $data); echo $data; EDIT: escaped the ' ;P
-
I have a straightforward question about errors in general
MadTechie replied to cluce's topic in PHP Coding Help
this may help <?php // Turn off all error reporting error_reporting(0); // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings ...) error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Report all errors except E_NOTICE // This is the default value set in php.ini error_reporting(E_ALL ^ E_NOTICE); // Report all PHP errors (bitwise 63 may be used in PHP 3) error_reporting(E_ALL); // Same as error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ?> -
Well personall your he adding to that list forever.. but whats wrong with that script ?
-
OK but this foum has parsed the post so i have no idea what you want? can you post and example ie from The research showed that the country's appeal to the young was falling as the 20 to 24 year old group was now the least likely to travel to the country. <img src="test.jpg"> to The research showed that the country's appeal to the young was falling as the 20 to 24 year old group was now the least likely to travel to the country.
-
can you post in code tags #1 what you have (want to change) #2 what you want #1 to look like after filtering also can a mod/admin move this to the correct section please EDIT: correct section is regex
-
like so.. $conn = mysql_connect("localhost", "mysql_user", "mysql_password"); //error handle if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } //error handle if (!mysql_select_db("mydbname")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $sql = "SELECT id as userid, fullname, userstatus FROM sometable WHERE userstatus = 1"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result)); $uid = $row["userid"]; $name = $row["fullname"]; $status = $row["userstatus"];
-
I have a straightforward question about errors in general
MadTechie replied to cluce's topic in PHP Coding Help
have you even tried it? also change $auth = @mysqli_query($mysqli,$val) or die(header("Location: error.html")); to $auth = @mysqli_query($mysqli,$val) or header("Location: error.html"); -
you can use the .htaccess method but in the admin center of vBulletin their an option to ban via IP, this is the same as writting a flatfile and storing the IP their.. as for his IP, does he also have unlimited emails (yes i know you can setup hotmail etc) but if your forum requires the users to activate their membership via email and you just keep banning the email's and IP's he should get bored and move on, as for the posts you can filter the message, i had a problem where a member was posting links to his own forum.. over and over.. while he got banned for spamming his post was in vain as the filter changed his link from http://www.hisforum.com to http://#spam#.com.. the fact is you don't really know its him until he starts to post.. keep carm and don't respone just filter delete and ban.. nothing more he get bored.. also as a side note he could just use a proxy to get past the IP lockout
-
vBulletin can ban the IP's so no code is needed !
-
Function not executing upon success with IPN script
MadTechie replied to MasterACE14's topic in PHP Coding Help
if the "IPN Validation Failed" then shouldnt you be asking PayPal ? (sorry if that sounds rude) but that from their server..! -
Bascially the problem is how the screen shot is taken, ie from IE/Firefox etc.. Mac or PC or *nix.. if you have some software on the server to goto that site using the defind browser then yes you could do it but that feature is not in PHP/Apache yes theirs probably software that will do it, infact if your running a windows sever then a simple VB app that accepts connections on another port and dumps the image to a apache folder could be written in a short time.. but then your need to have access to that sever to install and setup the software.. so you CAN do it but is it worth it ? If you want to use this then browsercam.com have done just that.. I hope this helps
-
Any Way To Prevent DB Timeout Caused by Server Load Problem?
MadTechie replied to phpQuestioner's topic in PHP Coding Help
you sure your scripts are not causing the overload ? -
setup a database with a table with all the countries, ID Country 1 US 2 UK and another table with the states ID CountryID State 1 1 NewYork 2 2 London 3 2 Wales etc then a form using ajax to populate the second drop down using the Country:ID to State:CountryID
-
Function not executing upon success with IPN script
MadTechie replied to MasterACE14's topic in PHP Coding Help
what part of the code does that ? NB: i just woke up so i may still be blind -
try echo "."; flush(); or even echo ""; flush(); after each send but maybe concat the names into one email and send it basically the script will timeout if nothing is send to the screen so send a dot or nothing
-
or .. <?php $sql = "SELECT * FROM table_name "; if ($_POST['dropdown'] == "All"){ $sql .= ""; } else { $sql .= "WHERE area = '" . $_POST['dropdown'] . "'"; } ?>
-
quick example from top of my head $day = 22; //example $NewDay = $day."th"; if($day == 1 || $day == 21 || $day == 31) { $NewDay = $day."st"; } if($day == 2 || $day == 22) { $NewDay = $day."nd"; } if($day == 3 || $day == 23) { $NewDay = $day."rd"; }
-
maybe <?php $theArray = array( '0_0_0_0_VALUE' => "Test XML", '0_0_0_0_TAG' => "CUSTOMERCONTEXT", '0_0_0_1_VALUE' => "1.0007", '0_0_0_1_TAG' => "XPCIVERSION", '0_0_0_TAG' => "TRANSACTIONREFERENCE", '0_0_1_VALUE' => "1", '0_0_1_TAG' => "RESPONSESTATUSCODE", '0_0_2_VALUE' => "Success", '0_0_2_TAG' => "RESPONSESTATUSDESCRIPTION", '0_0_TAG' => "RESPONSE", '0_1_0_VALUE' => "smita_b", '0_1_0_TAG' => "SUBSCRIBERID", '0_1_1_0_VALUE' => "Alternate Billing", '0_1_1_0_TAG' => "NAME", '0_1_1_1_VALUE' => "82C0E7922B3BA32B", '0_1_1_1_TAG' => "NUMBER", '0_1_1_2_0_VALUE' => "A", '0_1_1_2_0_TAG' => "CODE", '0_1_1_2_1_VALUE' => "Active", '0_1_1_2_1_TAG' => "DESCRIPTION", '0_1_1_2_TAG' => "SUBSCRIPTIONSTATUS", '0_1_1_3_0_VALUE' => "070801_1517400012"); $newArray = array(); foreach($theArray as $K => $A) { if (preg_match('/TAG/i', $K)) { $Key = preg_replace('/TAG/i', 'VALUE', $K); $ZKey = $theArray[$K]; $newArray[$ZKey] = $theArray[$Key]; } } echo "<pre>"; print_r($newArray) ?> Note [*CODE] is without the *
-
it filters out special characters used for injection.. it filters cookies, sessions, posts & gets
-
erm.. wouldn't that mess the array up ? as you can only have the key name once!
-
email / excel spreadsheet writer part of previous.
MadTechie replied to jake2891's topic in PHP Coding Help
DON'T DOUBLE POST! also whats the "problem" -
personally i only use{} when i include an array ie $sql = "SELECT id, title, date, description, publish FROM $dbtable WHERE title LIKE '$search%' || body LIKE '$search%' && publish='{DATA['publish']}' ORDER by id DESC LIMIT '$offset', '$limit'"; note the publish='{DATA['publish']}'