Jump to content

ansharma

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Everything posted by ansharma

  1. Hi all i wrote an .htaccess file for my website, for clean urls but it works only for first dynamic parameter and skips other ones. my code is RewriteRule (.*)~(.*) /detail.php?city_name=$1&prop_url=$2 [NC] RewriteRule (.*)-flats /all.php?city_name=$1 [NC] RewriteRule (.*)-flats-(.*) /all.php?city_name=$1&status=$2 [NC] RewriteRule (.*)-flats-page-(.*) /all.php?city_name=$1&page=$2 [NC] RewriteRule (.*)-flats-(.*)-page-(.*) /all.php?city_name=$1&status=$2&page=$3 [NC] RewriteRule services\.html /services.php [NC] RewriteRule contact_us\.html /contact_us.php [NC] RewriteRule about_us\.html /about_us.php [NC] RewriteRule blog/(.*) /blog/(.*) [NC]
  2. solved problem arised because of additional white space in url $urlval = str_replace("href=","",$urlval); $urlval = trim(str_replace("'","",$urlval)); echo $urlval.'<br>'; pager($urlval);
  3. Hi all i am trying to use curl function recursively but when the function first execute it get the content but next time it give the following error Protocol http not supported or disabled in libcurl $url = "http://www.example.com"; pager($url); function pager($url){ $urlArray = array(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); echo curl_error($ch); // code to get url from result // i get an array here $urlArray curl_close($ch); foreach($urlArray as $value){ $urlval = urlget($value); if($urlval) { $urlval = str_replace("href=","",$urlval); $urlval = str_replace("'","",$urlval); echo $urlval.'<br>'; pager($urlval); } } }
  4. Hi all, i have two websites hosted on the same linux server and same database and hence image folder is also same. website1.com and website2.com image folder is in website1.com directory so the image url is www.website1.com/images/image1.jpg. but problem arise when i want to use website1.com's image folder in website2 then image path becomes www.website1.com/image/1.jpg is there any way to rewrite www.website1.com/image/1.jpg to www.website2.com/image/1.jpg but image comes from www.website1.com/image/1.jpg thanks in advance
  5. any body ....
  6. Hi all, i am facing very strange issue, i used 301 redirection in my website like this Redirect 301 /text/text2 http://www.testing.com/text/text2-extra-text it redirects user coming from http://www.testing.com/text/text2 to http://www.testing.com/text/text2-extra-text but it appends ?/text/text2 at the end i.e url is http://www.testing.com/text/text2-extra-text ?/text/text2 please help thanks in advance
  7. Thanks The Little Guy it is very helpful
  8. Hi all, i have a very large xml file containing 2000 child nodes. i am using DOMDocument to read xml data but it shows whole data at once, i want to fetch first 20 or 30 nodes first time and then rest leave for pagination. is there any way to do so. to read only first few records from xml file. Thanks in advance...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.