using the letter h in regular expression not working?

I’ve been at this for hours…any help would be greatly appreciated.
I want to preg_match_all between strings, “Level:” and “<HR>“
everything works except when I add the letter h
Why?!?
<?php
include(“courses.php”);
preg_match_all(‘/(level:.*?)r>/i’, $str, $matches);
// this works but picks up <br>, so i wanted to add in the letter h

preg_match_all(‘/(level:.*?)h/i’, $str, $matches);
// i’ve tried changing it to `hr` but [...]

Twitter API returns error 215, Bad Authentication Data

I am trying to call following Twitter’s API to get a list of followers for a user.
http://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=username
And I am getting this error message in response.
{
code = 215;
message = “Bad Authentication data”;
}
I can’t seem to find [...]

Updating an XML node in PHP

I am having trouble updating nodes in an xml file. My xml files is like this.
<?xml version=”1.0″ encoding=”UTF-8″?>
<layout>
<container id=”container”>
<container id=”topbar”>
<container id=”top_nav”>
<widget name=”menu”><parameter name=”menuid” value=”6″></parameter></widget>
[...]

Java Applet and File Upload PHP Apachae

I want to upload some files from client system using applet
I am using following code of PHP

$maxsize = 10485760;
$array_estensioni_ammesse=array(‘.tmp’);
$uploaddir = ‘uploads/’;
if (is_uploaded_file($_FILES['file']['tmp_name']))
{
if($_FILES['file']['size'] <= $maxsize)
{
[...]

MS-SQl Connect on a Media Temple DV 4.0

I’m really stumped on this on. Trying to connect to a MS-SQL database with php on my mediatemple DV 4.0 server.
I was able to get it working on our DV 3.5 using these instructions
http://kb.mediatemple.net/questions/233/Using+%28remote%29+MS-SQL+databases+with+PHP+on+a+%28dv%29
But the same steps dont work on the 4.0.
I even tried installing FreeTDS and reinstalling the 64 bit version:
freetds-devel-0.64-1.el5.rf.x86_64.rpm
and then i [...]

Php cannot read data sent via ajax

Javascript part

PHP part
<?php echo $_REQUEST['p'] ?>

Just a stupid problem but i’m really stuck here

ws-trust with wso2 php framework

Are there examples showing ws-trust and saml 2.0 usage with the wso2 php framework as I have to get a RSTR token from an https webservice and then consume that token and sign the request to talk to another service with the binarysecret symmetric key received in the RSTR token.
I can do everything without the [...]

php how to test if file has been uploaded completely

is there any way how can I check if file has been uploaded completely on the server? My scenario: User uploads file over ftp and my other PHP task is running in cronjob. Now I would like to check if file has been uploaded or if user is still uploading. It is essencial because then [...]

Access private value in namespaced public function

I have a value that only needs to be calculated once. I can’t use const to declare it though because I need to run some functions to calculate initially. I’d like to be able to store it in somewhat protected way and access it in a (namespaced) global function. What’s is a good pattern to [...]

id3 reading from mp3 files

i have the below script for reading mp3 files id3.i have checked manually that id3 tags are there in mp3 files but my output always returns for few files
MP3 file does not have any ID3 tag!. i am converting these files from ffmpeg when i run the below code for original files it shows the [...]

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