belick
-
Posts
60 -
Joined
-
Last visited
Never
Posts posted by belick
-
-
yes, thanks but 1 issue... I tried to add more text to return $linkUrl; and it always bring the extra text after the quotes:
function link_replace_callback($matches) {
$linkUrl = str_replace(" ","-",strtolower($matches[0]));
return $linkUrl.".html";
}
echo preg_replace_callback('~href="([^"])+"~', "link_replace_callback", $WebPage);
and on my links I get:
<a href="test-trest".html</a>
-
I need a code for htaccess... so the page will have links with spaces and capital letter
-
I am looking for a code that will direct my links from something like Click Here to click-here
I want to be able to type links with spaces and uppercase words and to be able to search the code in the original form
example:
my htaccess has: #RewriteRule ^(.*)\.html$ index.php?Level2=$2 [L]
when $2 is the file I am looking for... so I want to be able to have convert links that have spaces to lowercase and with dashes
so code like:
<li><a href="Credit Card Validation">Credit Card Validation</a></li>
will assign the $2 to credit-card-validation and stilll show on the html code the spaces and uppercase
Thanks ahead
-
I was looking for smthing like this:
echo preg_replace('~href="([^"])+"~', 'href="'.strtolower("$1").'"', $WebPage);
but the strtolower("$1") is not working... also I want to look for anything without the html
the idea is to look for any link like: Home Page, About Us and such and convert it to lowercase without spaces... and then to add .html
-
Thanks, but the problem is that the preg need to look for any string and not for specific one...
-
I want to look for anywhere in the page that there is links and if there is a link with spaces like below then to convert it to:
1. Lowercase
2. spaces = deshes
3. add .html at the end
href="Search Engine Optimization"
will be:
href="search-engine-optimization.html"
is it possible?
-
I have this code:
RewriteRule ^e-([0-9_A-Z_a-z-]+)\.html$ /search.php?q=$1 [L]
and it not taking urls like:
/e-Dsasd.dsd.sa.html
/e-Dsa/sdds/d/sa.html
/e-Dsa / sd.dsd sa.html
/e-Dsasd&dsdsa.html
Please help how to get the code to read all char in between the ".html" and "e-"
-
that can't work because I have a lot of different queries and its not matching because 1 or 2 characters...
-
I have a field on database with this data:
"'upholstery cleaning & maintenance tips"
and I want to look it up with a string with out the "&" sign...
something like
SELECT * FROM TABLE WHERE Field1 LIKE '%upholstery cleaning maintenance tips%'
Thanks
-
My link looks like that: real-estate_helpful-moving-links.html I need to get 2 variables out from that link:
$var1 = real-estate
$var2 = helpful-moving-links
I know I can do that thought explode("_" on the the php side, but I prefer to do it on the htaccess file if it possible...
any help will be great!
Thanks
-
what I can do it I want google to read only one specific file like that: google1059dfsfdsfsd7ea01.html and continue use the rest to go to the index.php?
-
I have this line that works good for me. The problem is that its affecting any folder in the server including sub domains
can I have some kind of a code that will allowed me to choose which folder not to use the RewriteRule
RewriteRule ^(.*)\.html$ index.php?Level1=$1 [L]
Thanks
-
hi, I need help to fetch zip code out from text, with regex maybe...
Bais Menachem Young Israel at USF
Marshall Center, Box 2499
Tampa, FL 33620-1234
Phone: 813-832-3018
email: youngisraeltampa@hotmail.com
or
Bais Menachem Young Israel at USF
Marshall Center, Box 2499
Tampa, FL 33620
Phone: 813-832-3018
email: youngisraeltampa@hotmail.com
-
Dose anyone have any idea what is the best way to run a back site and to be able to have the same data in both database?
once I read that there is a Mysql function that can sync the 2 database and update the missing info...
any help?
-
I have this code and its not worrking for me... even if I add all the user premission for both users to use both database
mysqldump --host=localhost -uUSERNAME -pPASSWORD DB1 --no-create-db --no-create-info | --host=localhost -uUSERNAME -pPASSWORD DB2
Thanks
-
its on and also in the phpinfo()
-
Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? (34696247)
-
I am tring to use: fsockopen() and I am geting an error to enble it in php.ini. and I did. I think I need to compile it, how do I do that? I have php 5 on centos.
Thanks
-
Questions:
#!/usr/bash
tar -cvf file.tar directory
gzip file.tar do I must go with zip too?
mcrypt file.tar.gz where do I place my pasword? I need to protect the file...
ftp put file.tar.gz.nc hostname hostname means the ftp? where is the username and pass?
Thanks
-
I know that I can do it through the cpanel on my server but I need to create a host for every city in the US... so I need somthing easier...
-
I am able to use the include with URL after editing the php.ini in ver 4.4... my question is if its normal to use it or I should stick to fopen, fgets, fread, ...
-
I am using include "http://www.com" and I know that there is another way to do so by fget or other functions... do you know what is the best way also to save memory?
Thanks
-
I am tring to pass a POST to an include in some way, here is what I had in mind:
$_POST[anything] = 'something';
into:
include "http://www.domainname.com/file.php";
when file is:
<?PHP
echo "$_POST[anything]";
?>
Thanks
-
I think its easier through .htaccess... if its posibile... anyone know how to do that with .htaccess?
CronJOb and Imap is not working when disable email
in PHP Coding Help
Posted
I have a script that fetch emails and its work file when I call it through SSH with PHP at the beginning on the path
when I added a cronjob it was working fine too... the problem start when I disable the cronjob email response, the script dose not functioning with Imap
What can I do in order to bypass this problem, I will try to call it with include but I have no other options..
Please help